0

I have java Swing Dj Native application and i tried to run it in ubuntu and its Running but when i tried same in windows 64 bit its giving error so what error is that can any body suggest me solution?

Error log in windows.

NativeSwing[1]: Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
NativeSwing[1]:     no swt-gtk-4332 in java.library.path
NativeSwing[1]:     no swt-gtk in java.library.path

What error is this? how to resolve it?

Kishan Bheemajiyani
  • 3,429
  • 5
  • 34
  • 68
  • 1
    A better question would be "why is it trying to load swt-gtk on Windows?" since the Windows version of swt is swt-win32 (and yes, it's named swt-win32 for both the 32-bit and 64-bit versions). – Powerlord Apr 28 '14 at 14:09
  • yes U right i Resolved this Question by taking out that jar from class path u can put it as ans i will accept :) – Kishan Bheemajiyani Apr 28 '14 at 14:12

1 Answers1

1

The Windows version of SWT is named swt-win32 (even on 64-bit platforms).

So, you have to change the classpath to point to the correct name for SWT on the platform you're using.

Powerlord
  • 87,612
  • 17
  • 125
  • 175
  • Still, I thought I saw somewhere on the SWT site how to configure the dependencies in the jar itself (if you're turning your app into a jar) for different platforms... if I find it, I'll probably add it to the answer. – Powerlord Apr 28 '14 at 14:14
  • Oh blah, the multiplatform thing is [only for WebStart applications](https://www.eclipse.org/swt/jws/). – Powerlord Apr 28 '14 at 14:17