I attempted to make a shell script to launch a java program packaged into a .jar file. It should have been pretty simple.

java -jar Test.jar

but for some reason this script never runs. i've manually executed the command and it works perfectly, i've checked the path of the JVM and nothing is wrong. What have i missed? can anyone help?

Recommended Answers

All 2 Replies

That's interesting!

If you can run that from the command line, it *should* work in a script as well... Perhaps try using the full path to 'java' and the full path to the Test.jar?

yes that did the trick :), what i did was,

cd directorypath;java -jar Test.jar;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.