Search code examples
javajvmdjnativeswing

Problem using Java DJNativeSwing library on a 32 bit platform


I have a problem regarding the use of DJ NativeSwing library on a 32 bit JVM:

  • the library works well on 64 bit JVM
  • on a 32 bit JVM I receive the following error: Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot load 64-bit SWT libraries on 32-bit JVM

Is there a workaround for this type of problem? I want it to load on 32 and 64 bit machines.

P.S. I am using this library to load Youtube videos inside my Java desktop application. I was wondering if there is an alternative to using JWebBrowser (from DJ NativeSwing) just to show some youtube videos (like a Youtube Viewer or something).

P.S.S. I am using Java 6.


Solution

  • SWT does have 32-bit libraries available, so you'll need to make sure you have them available when running in a 32-bit environment.

    You might also want to just forget about them, since 32-bit environments are becoming quite rare. You might want to update your Java too, since Java 6 is 10 years old and you're not maintaining a legacy application that relies on it.