Question

I'm trying to setup a kiosk type system in linux where a java application launches when X is initialized. I've got a script which does the following:

java -cp {correct path to JAR with main method} -jar {name of JAR}

When I've cd'd into the directory where the JAR sits, everything is peaches and the system works like I want, however, if I navigate to any other directory, X terminates and reports that it could not access the JAR.

What am I missing here? Any help is greatly appreciated.

Was it helpful?

Solution

You don't need the -cp and the -jar

java -jar {full path}

should work. Your mainifest file in the .jar should then specify the appropriate main() method. See here for more details on that.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top