yet ANOTHER java.lang.UnsatisfiedLinkError with SWT ...

Started by Spectre1337, November 10, 2006, 17:02:51

Previous topic - Next topic

Spectre1337

I've found some threads on a similar issue but I believe my problem is different.

I'm developing a SWT user interface with a LWJGL GLCanvas in the middle and the program worms perfectly from within Eclipse, but when I try to export it into an executable JAR file I run into the following problem:

When I try to run my executable jar with the LWJGL GLCanvas on the shell, I get the following error:

java -jar Test.jar Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-wgl-win32-3235 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 org.eclipse.swt.internal.Library.loadLibrary(Library.java:123)
        at org.eclipse.swt.internal.opengl.win32.WGL.<clinit>(WGL.java:17)
        at org.eclipse.swt.opengl.GLCanvas.<init>(GLCanvas.java:80)
        at MainWindow.createOpenGlWindow(MainWindow.java:76)
        at MainWindow.main(MainWindow.java:55)


As evident from the call stack this error happens as the GLCanvas is being initialized.

If I simply replace my GLCanvas with an empty Composite, the entire program works fine as a standalone executable JAR. This means that the SWT system itself as well as the location of the JAR and DLL files are properly configured, at least for standard SWT.

This is my manifest:

Manifest-Version: 1.0
Main-Class: MainWindow
Class-Path: swt.jar lwjgl.jar lwjgl_test.jar lwjgl_util.jar lwjgl_util_applet.jar jinput.jar


The following JARs and DLLs are in the root directory of my project:

Test.jar (executable)
swt.jar
jinput.jar
lwjgl.jar
lwjgl_test.jar
lwjgl_util.jar
lwjgl_util_applet.jar
swt-win32-3235.dll
lwjgl.dll
jinput-dx8.dll
jinput-raw.dll
OpenAL32.dll


The Java VM is clearly assuming that swt-win32-3235.dll doesn't exist, which it does. If it didn't exist, or if it were a corrupt file, it wouldn't work if I simply replaced GLCanvas with a Composite.

Any ideas? What am I doing wrong?

Matzon

hmm, not sure whats going on to be honest - probably more an swt issue than lwjgl ?

Spectre1337


Matzon

Quoteorg.eclipse.swt.opengl.GLCanvas
I'm guessing swt  :wink:

Spectre1337

is there any SWT forum you could recommend? the ones i've found don't seem to be very active.

llama

Put swt-wgl-win32-3235.dll in your root directory.