bindyas wrote:When debugging Jar files, don't double click them to open them. The error output is not visible, so you are 'fighting with one arm tied behind your back'. Instead, launch them from the command line, where errors are visible. To launch a Jar from the command line, navigate to the directory with the Jar and type..
..I have a java application using Java OpenGL canvas and Swing components in seperate panels. When I double click my executable jar, the swing components work fine, but I am not able to see the OpenGL canvas panel.
prompt: java -jar thejarname.jar
Can anyone explain why this is happening and how to solve it?It is possibly because the OpenGL classes are not on the run-time classpath of the application, but we will know more once you have copy/pasted the [exact output|http://pscode.org/javafaq.html#exact] you get from running it in the command line.
bindyas wrote:You're welcome.
Thank you for the help.
...The jogl jar was not included in the classpath. The error was as follows.Out of curiosity.
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.sun.opengl.impl.windows.WindowsGLDrawableFactory
Though I had included the jogl.jar in manifest.mf, it seems to have no effect.
Contents of my manifest.mf
Class-Path: gluegen-rt.jar jogl.jar
I am glad that the .bat file works. If the jar could be directly executable, would be better.OK - let's focus on getting it to work as a 'double click' Jar, since that is much better, but for the moment continue with the command line, for the extra information it provides.
..what is the output?