views:

72

answers:

1

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.

+1  A: 

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.

Brian Agnew
Thanks very much for the help and the link, I appreciate it.
No problem. Hope that solves it for you.
Brian Agnew