eclipse jogl error

Hi, I just downloaded jogl and I’m trying to use it with eclipse.
My project has no coding errors but I recieve the the following runtime error:

Exception in thread “main” java.lang.UnsatisfiedLinkError: no jogl in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at net.java.games.jogl.impl.NativeLibLoader$1.run(NativeLibLoader.java:72)
at java.security.AccessController.doPrivileged(Native Method)
at net.java.games.jogl.impl.NativeLibLoader.load(NativeLibLoader.java:58)
at net.java.games.jogl.impl.GLContext.(GLContext.java:52)
at net.java.games.jogl.impl.windows.WindowsGLContextFactory.createGLContext(WindowsGLContextFactory.java:147)
at net.java.games.jogl.GLCanvas.(GLCanvas.java:72)
at net.java.games.jogl.GLDrawableFactory.createGLCanvas(GLDrawableFactory.java:150)
at net.java.games.jogl.GLDrawableFactory.createGLCanvas(GLDrawableFactory.java:118)
at net.java.games.jogl.GLDrawableFactory.createGLCanvas(GLDrawableFactory.java:85)
at ObrienTransformation.(ObrienTransformation.java:49)
at ObrienTransformation.main(ObrienTransformation.java:42)

I’m new to jogl and have no idea what’s going on. I put the jogl.jar and jogl-natives-win32.jar classes in the workspace folder.

Hi,

You have to unjar the native part and either put it into your jre installation or use the java.library.path property… (lot of examples in the forum)

Thanks,

I unjarred the native part, but still get the same errors. Where should I put the jogl.dll and jogl_cg.dll files?

In the execution directory of your project (in Eclipse, it is by default the root of the project in the workspace).

            Vincent

Awesome, it works

thanks a lot

I always place everything in …/jre/lib/ext. I’ve heard you’re supposed to put the jars there and the DLL files in the jre/bin, but I prefer to keep them together.

NEVER copy anything into the jre directories. Will only lead to conflicts >:(

Can you tell us why it will lead to conflicts? I’ve seen it suggested to place it there before and that’s where i always put any of my required extensions rather than add things to the system classpath etc.

The general idea is that if program X needs extension A v1.0 and program Y needs extension A v2.0 you are going to mess one of X or Y up by placing the extension directly in the JRE instead of the classpath used for launching X or Y.

That being said, I usually place stable extensions provided by Sun in the JRE “ext” folder. Things like the Java Mail API and other “standard extensions”.

But things like JOGL that are evolving more quickly tend to break things if they are placed in the extensions folder.

If it’s my JDK’s JRE, then I see no conflict in placing the jars in jre/lib/ext. Deployment and playing nice with other apps is another issue.