Hi I am just trying to convert a Windows batch file to a unix shell script to run a java application, but it so long since Ive used UNIX I cant really remember how to do it.
My script contains
#!/bin/sh
java -jar lib/testapp.jar
These are my failed attempts to run it, not too sure what the differences are but I think the 3rd one is the only one to actually find my shell script.
[root@]# testapp.sh
-bash: testapp.sh: command not found
[root@]# ./ testapp.sh
: bad interpreter: No such file or directory
[root@]# . testapp.sh
Unable to access jarfile lib/testapp.jar
if I just do this at the command line it works fine
[root@]#java -jar lib/testapp.jar