Re: Beginner Deployment Questions
Posted by
jmaasing on
Jan 26, 2014; 9:24pm
URL: https://forum.jogamp.org/Beginner-Deployment-Questions-tp4031359p4031373.html
When you use java -jar all classes must be in the JAR or pointed to by the Class-Path attribute of the MANIFEST.MF file. Environment variables and -cp arguments are ignored (
http://docs.oracle.com/javase/7/docs/technotes/tools/windows/java.html).
Here is how to set up the manifest.mf file
http://docs.oracle.com/javase/tutorial/deployment/jar/downman.htmlBut usually the "can not find main class" usually means exactly that it can not find the main class. Otherwise you would get classloader errors or other errors. Make a simple hello-world java class without external libraries and see if you can get it running from a jar-file, when that works go on to add external libraries and see what happens.