Problems with JOGL

Hi everyone,



I ve just finished installing jME with netBean, thanks to the tutorial from the wiki section. All this stuff is very new to me, it s probable that I have skipped something through.



I ve copy-paste the HelloWorld.java example, as explained in the tutorial, 3rd section and I ran the project.



In the dialog box that popped up for display settings, before the full screen with the 3d cube, everything worked fine with WJGL selected. But if I select JOGL or dummy, i get this error message:





GRAVE: Exception in game loop

java.lang.UnsatisfiedLinkError: no jogl in java.library.path

       at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1709)

       at java.lang.Runtime.loadLibrary0(Runtime.java:823)

       at java.lang.System.loadLibrary(System.java:1028)

       at com.sun.opengl.impl.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:189)

       at com.sun.opengl.impl.NativeLibLoader.access$000(NativeLibLoader.java:49)

       at com.sun.opengl.impl.NativeLibLoader$DefaultAction.loadLibrary(NativeLibLoader.java:80)

       at com.sun.opengl.impl.NativeLibLoader.loadLibrary(NativeLibLoader.java:103)

       at com.sun.opengl.impl.NativeLibLoader.access$200(NativeLibLoader.java:49)

       at com.sun.opengl.impl.NativeLibLoader$1.run(NativeLibLoader.java:111)

       at java.security.AccessController.doPrivileged(Native Method)

       at com.sun.opengl.impl.NativeLibLoader.loadCore(NativeLibLoader.java:109)

       at com.sun.opengl.impl.windows.WindowsGLDrawableFactory.<clinit>(WindowsGLDrawableFactory.java:60)

       at java.lang.Class.forName0(Native Method)

       at java.lang.Class.forName(Class.java:169)

       at javax.media.opengl.GLDrawableFactory.getFactory(GLDrawableFactory.java:106)

       at javax.media.opengl.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:520)

       at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:131)

       at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:90)

       at com.jmex.awt.jogl.JOGLAWTCanvas.<init>(JOGLAWTCanvas.java:92)

       at com.jme.system.jogl.JOGLDisplaySystem.createGLCanvas(JOGLDisplaySystem.java:364)

       at com.jme.system.jogl.JOGLDisplaySystem.createWindow(JOGLDisplaySystem.java:144)

       at com.jme.app.BaseSimpleGame.initSystem(BaseSimpleGame.java:380)

       at com.jme.app.BaseGame.start(BaseGame.java:70)

       at hello3d.test.HelloWorld.main(HelloWorld.java:51)




Does somone know what that means? Should I have installed JOGL seperately before? Isnt it supposed to be in the jME installation zips that I downloaded (according to the tutorial), just like LWJGL?



Thanks a lot!



Fred

The tutorial you used only lists what is needed to run the LWJGL implementation :slight_smile:



Assuming you've used the jar's off of Google Code, you'll have to add the jogl.jar located at lib/jobgl.jar and add that to the build path the same way you added the other jar's

hum… yes I followed the tutorial and downloaded the files from google code. But as it was explained in the tutorial, I imported All the jar files in the lib/ directory and so the jogl.jar was imported as well.



By the way, in my Project panel (netbean), I can see the library jogl.jar after having expanded the “libraries” node of my project. Here s a proof:







weird  :?



Anyways, thanks for the answer  :wink:

The error was referring to the native libraries for JOGL. In Windows, these are the .DLL files. I don't know how to set it up in Netbeans. But if you search for "java.library.path" you will get plenty of advice on how to solve this issue that hit almost every noobs.



Roslan

Cool! I see exactly what you mean. Installing native libs on netbean is quite easy, i did it for jME. Everything now makes sense! Thank you!  :lol:



I m just curious about something… does that make any sense for game developpers to use jME with JOGL instead of LWJGL? I heard the former was less suited to game developpment? So is there any adbantage in JOGL, that would have me install the JOGL native library, since I m a "noob" in both these two binding's usage…?



Thanks a lot for your answers!





Fred

As far as I understand it, both JOGL and LWJGL are Java bindings for the OpenGL API which is C based. JOGL is the official SUN-sponsored package while LWJGL is an unofficial user-developed one. The native libraries are actually OpenGL DLLs.



There is an ongoing debate on which one is better for jME but jME was developed with LWJGL in mind and JOGL is seemed as an afterthought. Although, community member goussej is trying very hard to bring JOGL support on par with LWJGL on jME2.



Roslan

roslamir said:

The native libraries are actually OpenGL DLLs.

No they only contain the JNI code (and other utility code) - the actual OpenGL dll's are in windows/system32 (OpenGL(32).dll)
Matzon said:

the actual OpenGL dll's are in windows/system32 (OpenGL(32).dll)

Captain Obvious to the rescue! => not if you use Linux!  }:-@

I stand corrected.  :smiley:



We are like the blind leading the blind here.



Roslan

yeah… well…  :lol:



Anyways thanks a lot! I got the essential



See you on the next issue  :smiley: