SWT Hello World fails [message #707841] |
Tue, 02 August 2011 01:58  |
Eclipse User |
|
|
|
On a WinDoze 7 Pro 32-bit machine, if I follow the instructions for creating a Hello World SWT example, it will work for Helios, but when I try it on Indigo, it fails with the following message:
Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-win32-3735 in java.library.path
no swt-win32 in java.library.path
Can't load library: C:\Users\arick\.swt\lib\win32\x86\swt-win32-3735.dll
Can't load library: C:\Users\arick\.swt\lib\win32\x86\swt-win32.dll
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:285)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:194)
at org.eclipse.swt.internal.C.<clinit>(C.java:21)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:138)
at HelloWorldSWT.main(HelloWorldSWT.java:12)
The project, org.eclipse.swt.win32.win32.x86 is in the build path of my HelloWorldSWT project. What I don't understand is why it is looking in my home directory for the SWT DLL?
|
|
|
|
|
|
|
|
|
Re: SWT Hello World fails [message #1212966 is a reply to message #1066525] |
Tue, 26 November 2013 22:59  |
Eclipse User |
|
|
|
It seems like the tutorial is missing a step or Eclipse has a bug. At least it is counter-intuitive to me that eclipse doesn't seem to configure the Native Library Location when you import a project.
I ran into this same issue recently on an iMac, so obviously, the eclipse team believes this is the best behavior.
BTW: On a mac, you need to add, org.eclipse.swt.cocoa.macosx.x86_64, and then point the Native Library Location, just as you do with org.eclipse.swt.{platform}.{os}.{arch}.
|
|
|
Powered by
FUDForum. Page generated in 0.04232 seconds