Results 1 to 2 of 2
I am trying to get a bash file to run a java program with a bunch of arguments.
This is what I tried
1. Create a little file > run_Java.sh
...
- 11-05-2011 #1Just Joined!
- Join Date
- Oct 2011
- Posts
- 29
Simple batch file to run java program
I am trying to get a bash file to run a java program with a bunch of arguments.
This is what I tried
1. Create a little file > run_Java.sh
2. In the bash file type: echo "java -jar my_Java_app arguments". (To manually run the program I type "java -jar my_Java_app arguments" into the command line.)
3. Make it executable with chmod +x
4. Moved it to /usr/bin
5. Type run_Java.sh in terminal
The terminal just displays the command, but does not execute it.
I tried program and exec in place of echo.
Any ideas?
- 11-07-2011 #2
Bash scripts work as direct input to the shell. So you put into a Bash script the exact lines that you want executed. "echo" prints out its argument, so if you put echo first, it (correctly) just prints out your command.
So just put the command you want to run.DISTRO=Arch
Registered Linux User #388732


Reply With Quote