Run a jogl 2.x demo !!(SLOVED)

I’m trying to run a jogl 2.x based demo. I just downloaded jogl-demos source code “jogl-demos-src.zip”
from https://jogl.dev.java.net/

No matter which demo I chose to run, i got the following exception

“Exception in thread “main” java.lang.UnsatisfiedLinkError: no nativewindow_jvm in java.library.path”

A full exception example is as follows:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no nativewindow_jvm 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.nativewindow.impl.NativeLibLoaderBase.loadLibraryInternal(NativeLibLoaderBase.java:199)
	at com.sun.nativewindow.impl.NativeLibLoaderBase.access$000(NativeLibLoaderBase.java:50)
	at com.sun.nativewindow.impl.NativeLibLoaderBase$DefaultAction.loadLibrary(NativeLibLoaderBase.java:88)
	at com.sun.nativewindow.impl.NativeLibLoaderBase.loadLibrary(NativeLibLoaderBase.java:126)
	at com.sun.nativewindow.impl.NativeLibLoaderBase$1.run(NativeLibLoaderBase.java:133)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.nativewindow.impl.NativeLibLoaderBase.loadNativeWindow(NativeLibLoaderBase.java:131)
	at com.sun.nativewindow.impl.jvm.JVMUtil.<clinit>(JVMUtil.java:53)
	at javax.media.opengl.GLProfile.<clinit>(GLProfile.java:625)
	at javax.media.opengl.awt.GLCanvas.<clinit>(GLCanvas.java:78)
	at demos.j2d.CustomText.main(CustomText.java:92)

Can anybody give me a hand?

Best Regards
JIA Pei

You need to specify the location of the dlls (the folder) with -Djava.library.path="/the/path/to/the/dlls/folder" on the command line when starting the demo.

Hi, Thanks for your reply!! yes, In windows, if I add those required .dll directories into Environmental Variables PATH, I got the correct compilation. However, this continues when I shift to Linux. I revised Nehe Lesson 1 to be compatible with JOGL 2.x and run it, I got the following errors:

Exception in thread “main” java.lang.UnsatisfiedLinkError: no nativewindow_jvm 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.nativewindow.impl.NativeLibLoaderBase.loadLibraryInternal(NativeLibLoaderBase.java:199)
at com.sun.nativewindow.impl.NativeLibLoaderBase.access$000(NativeLibLoaderBase.java:50)
at com.sun.nativewindow.impl.NativeLibLoaderBase$DefaultAction.loadLibrary(NativeLibLoaderBase.java:88)
at com.sun.nativewindow.impl.NativeLibLoaderBase.loadLibrary(NativeLibLoaderBase.java:126)
at com.sun.nativewindow.impl.NativeLibLoaderBase$1.run(NativeLibLoaderBase.java:133)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.nativewindow.impl.NativeLibLoaderBase.loadNativeWindow(NativeLibLoaderBase.java:131)
at com.sun.nativewindow.impl.jvm.JVMUtil.(JVMUtil.java:53)
at javax.media.opengl.GLProfile.(GLProfile.java:625)
at javax.media.opengl.GLCapabilities.(GLCapabilities.java:83)
at demos.common.GLDisplay.createGLDisplay(GLDisplay.java:36)
at demos.nehe.lesson01.Lesson01.main(Lesson01.java:10)

Problem solved.

In Linux, I need to specify those .so files as well!!