Run applet from command line exported using Proclipsing EclipseP5Exporter
in
Integration and Hardware
•
1 year ago
Hi
When runing an exported applet / jar from the command line using
java -jar QubulusMaps.jar
it works just fine. This jar has all the dependencies merged into it and is the default export option.
However when choosing the option "Force 'Multiple-Jars' (for custom OpenGL renderers)" I get the following results.
C:\users\martin\workspace\QubulusMaps\applet>java -jar QubulusMaps.jar
Exception in thread "main" java.lang.NoClassDefFoundError: processing/core/PAppl
et
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14
1)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Caused by: java.lang.ClassNotFoundException: processing.core.PApplet
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 12 more
Could not find the main class: qubulusmaps.QubulusMaps. Program will exit.
I tried the approach here http://processing.org/discourse/yabb2/YaBB.pl?num=1271480246 by calling
java -cp .\core.jar;. QubulusMaps
but get the following error
C:\users\martin\workspace\QubulusMaps\applet>java -cp .\core.jar;. QubulusMaps
Exception in thread "main" java.lang.NoClassDefFoundError: QubulusMaps
Caused by: java.lang.ClassNotFoundException: QubulusMaps
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: QubulusMaps. Program will exit.
Could anyone tell me how to make the multi jar scenario run so it finds both PApplet and my main class?
When runing an exported applet / jar from the command line using
java -jar QubulusMaps.jar
it works just fine. This jar has all the dependencies merged into it and is the default export option.
However when choosing the option "Force 'Multiple-Jars' (for custom OpenGL renderers)" I get the following results.
C:\users\martin\workspace\QubulusMaps\applet>java -jar QubulusMaps.jar
Exception in thread "main" java.lang.NoClassDefFoundError: processing/core/PAppl
et
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14
1)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Caused by: java.lang.ClassNotFoundException: processing.core.PApplet
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 12 more
Could not find the main class: qubulusmaps.QubulusMaps. Program will exit.
I tried the approach here http://processing.org/discourse/yabb2/YaBB.pl?num=1271480246 by calling
java -cp .\core.jar;. QubulusMaps
but get the following error
C:\users\martin\workspace\QubulusMaps\applet>java -cp .\core.jar;. QubulusMaps
Exception in thread "main" java.lang.NoClassDefFoundError: QubulusMaps
Caused by: java.lang.ClassNotFoundException: QubulusMaps
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: QubulusMaps. Program will exit.
Could anyone tell me how to make the multi jar scenario run so it finds both PApplet and my main class?
1