Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I did have JOGL1.1 set up and working, but I soon discovered that it did not support the latest OpenGL, so I started work on upgrading to JOGL2.0 it's not gone too well.

Firstly, is it worth me trying to get JOGL to work, or should I just move over to LWJGL? I am fairly comfortable with OpenGL (via C++) and from what I did get working with JOGL1.1, I seem to be OK adapting to it.

Assuming that I stick with JOGL, am I foolish for trying to use JOGL2.0? From what I can gather, JOGL2.0 is still in beta, but I am willing to go with it as I want to make use of the latest OpenGL I can.

I have been using the Eclipse IDE and have set up a user library for JOGL, here is a screen shot of the configuration and I have added this user library to my own Eclipse project. the system variable %JOGL_HOME% points to "C:\Users\edacosh\Downloads\JOGL2.0" so that should work fine.

Now, the problem I actually having, when I try to run my code, on the line

GLProfile glp = GLProfile.getDefault();

The code stops with the following message...

Exception in thread "main" java.lang.NoClassDefFoundError: com/jogamp/common/jvm/JVMUtil
    at javax.media.opengl.GLProfile.<clinit>(GLProfile.java:1145)
    at DiCE.DiCE.<init>(DiCE.java:33)
    at App.<init>(App.java:17)
    at App.main(App.java:12)
Caused by: java.lang.ClassNotFoundException: com.jogamp.common.jvm.JVMUtil
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 4 more

I have also set my project to ensure that it is using jre6 along with jdk6, as I was having some issues.

share|improve this question
    
That error simply means that the JVM couldn't find the com.jogamp.common.jvm.JVMUtil class. You are most likely missing a JAR in your build path configuration. As for LWJGL vs JOGL, that's up to you; perhaps this and this will help you. Notice that JOGL 2.0 has been out for over a year, perhaps several years. Personally, I still can hardly stand the JOGL site and can't find important stuff like downloads. –  Ricket Nov 15 '11 at 13:28
    
@Ricket, why y u no post as answer? But yeah, thanks for the info bud. Any idea how to work out what jar I would be missing? –  thecoshman Nov 15 '11 at 13:39
    
A JAR file is just a zip file, so I'd recommend just looking in your JAR files for that class file. Or maybe there's some documentation of which JAR files are needed? Or a JOGL chatroom/forum? I've pretty much given up on JOGL, not that it's a bad library at all, but LWJGL is actively being developed and used (Minecraft uses it, for example). –  Ricket Nov 15 '11 at 13:54
    
@thecoshman Don't use JOGL, use LWJGL instead. Google for more details. –  iamcreasy Dec 15 '11 at 15:14
    
@iamcreasy yeah... because that helps ¬_¬ –  thecoshman Dec 15 '11 at 15:54

3 Answers 3

up vote 1 down vote accepted

That error simply means that the JVM couldn't find the com.jogamp.common.jvm.JVMUtil class. You are most likely missing a JAR in your build path configuration.

As for LWJGL vs JOGL, that's up to you (and is entirely opinion, so not a good fit for this site); perhaps this and this will help you. Notice that JOGL 2.0 has been out for over a year, perhaps several years.

share|improve this answer

In order to fix the "Exception in thread "main" java.lang.NoClassDefFoundError: com/jogamp/common/jvm/JVMUtil"

You need to add the gluegen-rt.jar and jogl-all.jar to the classpath for both java and javac, the two jars are provided by JogAmp JOGL.

You may want to read the JogAmp Wiki that include setup instructions on how to do this:

http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE

http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE#Compile_and_run_your_project_from_the_command_line

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.