textureIO making UnsatisfiedLinkError

I just migrated to the latest jogl2 libraries and found a strange error. I started a project from scratch trying to isolate the error

What I do (beside normal initialization) is just loading a texture

tex = TextureIO.newTexture(new File(“Desert.png”), false);

and it causes

java.lang.UnsatisfiedLinkError: com.sun.opengl.impl.gl2.GL2Impl.glPixelStorei0(II)V

without it I can have an openGL window with quads in it. I run a 10.6 mac os X with java 1.6.0_17

I carefully copied the following files from the jogl-2-1.0-macosx-universal.zip (15 september 2009 version on the Kenai site in jsr-231-2.0-beta10/ folder)
-rwxrwxrwx@ 1 fredericvernier staff 13763 2 fév 2007 Desert.png
-rw-r–r-- 1 fredericvernier staff 26487 11 fév 16:19 gluegen-rt.jar
-rw-r–r-- 1 fredericvernier staff 1960856 11 fév 16:19 jogl.all.jar
-rw-r–r--@ 1 fredericvernier staff 49872 11 fév 16:21 libgluegen-rt.jnilib
-rw-r–r--@ 1 fredericvernier staff 3050288 11 fév 16:21 libjogl_gl2.jnilib
-rw-r–r--@ 1 fredericvernier staff 50424 11 fév 16:21 libnativewindow_awt.jnilib
-rw-r–r--@ 1 fredericvernier staff 45248 11 fév 16:21 libnativewindow_jvm.jnilib
-rw-r–r--@ 1 fredericvernier staff 113920 11 fév 16:21 libnewt.jnilib
-rw-r–r-- 1 fredericvernier staff 81678 11 fév 16:19 nativewindow.all.jar
-rw-r–r-- 1 fredericvernier staff 109727 11 fév 16:19 newt.all.jar

Did I miss something in the new file distribution structure ?
Should I include a more specific jar instead of the *.all.jar ?
Where the glPixelStorei0 function is supposed to be ?

Thank you very much if you can help.

This is a problem with your native library configuration. You have all of the correct jars and jnilibs, you must make sure that the you specify the java.library.path correctly when running the JVM:


java -Djava.librar.path=blaha mainClass

well I don’t think so. all the jnilib are in the same directory and java find at least few of them (otherwise jogl doesn’t work at all). The glPixelStorei0 signature let me think it is a jnilib problem. Maybe an architecture problem ? how do we know what architecture are the jnilib for ?

Delete all JOGL files from {java.home}/lib/, if any.

There was no jogl jar there … but I fixed the problem. I replaced all the jar/jnilib with the nighly build one and now it works.

… well almost. I still have a performance problem. I still played with my test application and I have a poor 15Hz to display a simple textured quad. I tweaked the parameters a little bit and I get a 366Hz … when I remove the myframe.setUndecorated(true); !!!

well I should start a new topic and close this one maybe. The problem is very different to the topic title now !