| SWT Hello World fails [message #707841] |
Tue, 02 August 2011 01:58  |
A. Rick Anderson Messages: 1 Registered: August 2011 |
Junior Member |
|
|
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 #720661 is a reply to message #707841] |
Tue, 30 August 2011 22:57   |
Kevin Messages: 2 Registered: August 2011 |
Junior Member |
|
|
I don't understand why it is looking in my home directory either. I'm wondering if this is an Indigo bug since you said the same tutorial worked in Helios? My first install of Eclipse was this past weekend, and it happens to be Indigo.
It would be nice if any Eclipse experts who monitor this forum could help us understand what is going wrong.
In the meantime, have you seen the answer by Pete in another thread on this?
[Note. The forum won't let me use a link until I've posted more than 5 messages (not sure why there is such a rule?), so the only way I can include the link I was trying to post is to transpose http to make it not look like a link. Just take my link and transpose ptth back to http to make it valid]ptth://www.eclipse.org/forums/index.php/m/720657/#msg_720657
Pete's answer was very helpful to me. At least it got me past the error and made the application work.
Best of luck to you.
[Updated on: Tue, 30 August 2011 23:02] Report message to a moderator
|
|
|
| Re: SWT Hello World fails [message #892437 is a reply to message #720661] |
Thu, 28 June 2012 04:35   |
Sébastien GUÉRIN Messages: 1 Registered: June 2012 |
Junior Member |
|
|
So best answer is (works for Eclipse Juno too) :
Pete wrote on Wed, 24 August 2011 07:03Had Same initial issue and finally sorted it by...
Right click on project and go to Properties
In Java Build Path under the Projects tab there is the associated Project, in my case org.eclipse.swt.win32.win32.x86
Expand this down with the little arrow to the left to display the options. Here I found Native Library Locations. This wasn't set so I selected it and clicked Edit.
In the Popup window that follows, I selected Workspace and then org.eclipse.swt.win32.win32.x86.
Next time I ran the class, it work fine.
I hope this helps someone!
[Updated on: Thu, 28 June 2012 04:37] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01632 seconds