views:

455

answers:

2

I have a java webstart program, it runs on xp, osx, vista, and windows 7. I just tried to run it on windows 7 64bit and it is having a problem loading a library. On this win7x64 machine I have the 64bit jdk/jre and the library it is not loading is swt-win32.dll. Yeah it's 32bit, but I'm getting:

Exception in thread "Thread-10" java.lang.UnsatisfiedLinkError: no swt-win32-3325 or swt-win32 in swt.library.path, java.libary.path or the jar file...

I have tried putting the dll on the java.library.path (physically copying it to the folder) and still get the exact same error. So am I getting this error because it's a 32bit dll or because it actually just can't find it? can the 64bit jdk/jre load/use 32bit dll's or do I need to either find the 64bit version of the dll or run the 32bit jdk/jre?

+3  A: 

You have the answer already. 64-bit DLL's require the 64-bit JDK and 32-bit DLL's require the 32-bit JDK.

Dave
I've found the JDK errors messages regarding native libraries aren't always the most intuitive. I'd also suggest testing outside of webstart.
basszero
Ok thanks, there error is just a bit misleading.
John Doe
@basszero This testing was outside of webstart :/
John Doe
A: 

swt-win32.dll is actually a SWT UI framework(eclipse) dll. Try putting it in a directory which is in your system path.

If that doesn't work, then your next best bet would be to get the SWT binaries for 64 bit windows here. I think it works for windows Vista 64. There is no mention of windows 7 but it "should" work.

coolest_head