Can't get JOGL to run after migration

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't get JOGL to run after migration

kitfox
I'm changing the way I'm linking libraries in a NetBeans project.  Up to now I've been using a NetBeans JOGL plugin.  I want to switch to linking the libraries directly.  Unfortunately, I'm getting errors as soon as I try and use JOGL:

[code]
        GLProfile glprofile = GLProfile.getDefault();

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at javax.media.opengl.GLProfile.getProfileMap(GLProfile.java:1584)
        at javax.media.opengl.GLProfile.isGL4bcAvailable(GLProfile.java:151)
        at javax.media.opengl.GLProfile.glAvailabilityToString(GLProfile.java:242)
        at javax.media.opengl.GLProfile.glAvailabilityToString(GLProfile.java:310)
        at javax.media.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1283)
        at javax.media.opengl.GLProfile.access$000(GLProfile.java:71)
        at javax.media.opengl.GLProfile$1.run(GLProfile.java:117)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.media.opengl.GLProfile.initSingleton(GLProfile.java:115)
        at javax.media.opengl.GLProfile.validateInitialization(GLProfile.java:1428)
        at javax.media.opengl.GLProfile.getProfileMap(GLProfile.java:1580)
        at javax.media.opengl.GLProfile.get(GLProfile.java:623)
        at javax.media.opengl.GLProfile.getDefault(GLProfile.java:480)
        at javax.media.opengl.GLProfile.getDefault(GLProfile.java:486)
        at com.kitfox.coyote.renderer.jogl.CoyotePanel.getCapabilities(CoyotePanel.java:90)
...
[/code]

I'm finding the documentation on how exactly to configure JOGL confusing and conflicting.

First I downloaded http://jogamp.org/deployment/jogamp-current/archive/jogamp-windows-i586.7z and unzipped it.  I tried following the instructions on http://www3.ntu.edu.sg/home/ehchua/programming/opengl/JOGL2.0.html, but I could not find the files "newt.all.jar" and "nativewindow.all.jar".  

I then tried following the instructions on http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE.  There's a different tutorial per editor, and each one has you including different jar files.  The NetBeans one just says include 'all' the jar files.  It looks like there are about thirty of them.

I tried including jogl.all.jar and gluegen-rt.jar in my above run.  I've included the library path to the .dlls in my VM options.  What am I doing wrong?
Reply | Threaded
Open this post in threaded view
|

Re: Can't get JOGL to run after migration

Pixelapp
Are you compiling against the latest java jdk. i.e. java sdk 1.7update1?

Try that.
Reply | Threaded
Open this post in threaded view
|

Re: Can't get JOGL to run after migration

kitfox
I'm using

java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode, sharing)
Reply | Threaded
Open this post in threaded view
|

Re: Can't get JOGL to run after migration

Wade Walker
Administrator
In reply to this post by kitfox
kitfox wrote
I tried including jogl.all.jar and gluegen-rt.jar in my above run.  I've included the library path to the .dlls in my VM options.  What am I doing wrong?
That looks correct -- those should be the only two JAR files you need now. The "newt.all.jar" and "nativewindow.all.jar" files were recently removed for RC4, but the wiki hasn't been updated yet.

Some things to check:

- Are there any other old JARs in your classpath? This is probably the most common problem
- Are there spaces in the path to your DLLs? If so, you need to quote the path in NetBeans (as mentioned in the wiki)
- Are you running a 32-bit or 64-bit JVM? Use the i586 7z file for 32-bit, and amd64 for 64-bit.
Reply | Threaded
Open this post in threaded view
|

Re: Can't get JOGL to run after migration

kitfox
Okay, I upgraded Java and NetBeans, and uninstalled all the old versions.  This time, my run worked.  Not sure if that's because the latest JOGL depends on the latest Java or if the uninstall got rid of some conflicting libraries.  Anyhow, glad it's working.
Reply | Threaded
Open this post in threaded view
|

Re: Can't get JOGL to run after migration

Sven Gothel
Administrator
On Tuesday, November 15, 2011 10:16:40 PM kitfox [via jogamp] wrote:
>
> Okay, I upgraded Java and NetBeans, and uninstalled all the old versions.
> This time, my run worked.  

> Not sure if that's because the latest JOGL
> depends on the latest Java
of course not!

> or if the uninstall got rid of some conflicting
> libraries.  Anyhow, glad it's working.

probably that .. as Wade mentioned, depends which version of JogAmp you use.

RC3 and post RC3 is covered in this post here as well:
  http://forum.jogamp.org/setting-up-JOGL-in-Eclipse-on-Mac-OSX-Lion-Frustration-td3435692.html#a3436274

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: Can't get JOGL to run after migration

Pixelapp
In reply to this post by kitfox
Ha ha ha. The latest the software, the less bugs you encounter.