Problem with my run.sh
Ok, im quite new to linux but have an "ok" knowledge of it.
I am trying to convert my batch file into a .sh file and i think i have it perfect but it just will not work, so obviously not perfect. This is the code for my batch file. Code:
@echo off This is the code for my run.sh. Code:
#!/bin/sh |
Well what messages do you get when it runs on the server?
Semicolons can't be the right delimiter on Unix, and if they are, you'll need to quote the input. An unquoted semicolon means "new command." Instead of "sleep", use "read". "sleep 10" will pause for 10 seconds. "read" will pause and wait for input. |
Ok, I've got to ask to cover all the bases. You have execute/run permissions on the script, right?
Secondly, I know nothing about executing java from the command line, but aren't the slashes in the command supposed to be forward slashes ('/')? Those look like references to files. Linux uses forward slashes to handle directory paths and uses backslashes to escape special characters. |
this is the error i get when i change the run.sh and edited the "\" to "/"
This is my run.sh file Code:
#!/bin/sh Code:
run.sh: line 2: deps/poi.jar: Permission denied I have chmod +x run.sh |
So, yes. Semicolons can't be the right delimiter on Unix, and if they are, you'll need to quote the input. An unquoted semicolon means "new command."
Instead of "sleep", use "read". "sleep 10" will pause for 10 seconds. "read" will pause and wait for input. Aren't the slashes in the command supposed to be forward slashes ('/')? Those look like references to files. Linux uses forward slashes to handle directory paths and uses backslashes to escape special characters. |
Quote:
Code:
#!/bin/sh I get an error with this. Code:
|
still looking for help <3
|
Note that the file doesn't have to end with .sh, Linux has no OS or filesystem-level concept of file extensions.
|
Quote:
So, we really can't help much other than to say the problem is likely in one of two places: 1. The command line is specifying the starting class incorrectly. This might be a result of the fact that Linux is case-sensitive for names, whereas my experience with Windows (which is somewhat dated now) indicates that Windows is NOT case-senstive. Verify how the class is defined in the code you're trying to start. 2. There is one (or more) additional files that are not being loaded/included properly. Double-check your paths for spelling mistakes and double-check your file lists to make sure all needed files are included on the command line. |
Quote:
The file server has bin src deps data run.sh the bin file goes like this. bin>server>and the Server.class file is in here. in the deps folder all the .jar files are in there. I really do not know why it is not working.. please help :L |
All times are GMT -5. The time now is 07:45 AM. |