Hi,
i’m trying to do the same things by loading the DLLs and the jar file from my code but i’m not able.
Here is the code i use (same as Jaeden):
//Allow loader
NativeLibLoader.disableLoading();
//Seems to have to load awt first
java.awt.Toolkit.getDefaultToolkit();
System.loadLibrary("jawt");
//Load the jogl jar file
URL urlJOGL = (new File(ThinClient.getPath() + "jogl.jar")).toURL();
URL[] urls = { urlJOGL };
URLClassLoader classLoader = new URLClassLoader(urls);
//Load the DLLs
System.load(ThinClient.getPath() + "jogl.dll");
System.load(ThinClient.getPath() + "jogl_awt.dll");
After this, i’m getting this error
java.lang.NoClassDefFoundError: com/sun/opengl/impl/NativeLibLoader
...
It was like if my jar wasn’t loaded. Anybody have an idea?
I want to do this cause on Windows i’m able to put the jar into the lib/ext folder and the DLLs into the bin folder of the JRE the first time, but i need a cross platform solution. On Linux i can’t do this, cause the JRE folders are 99% with root acces, so i cannont use this method with normal user. This solution seems good cause i put the files into the home directory of the user (i’ll adapt the code for others os after i’ll be able to load the stufss dynamically).
thx a lot!!!