|Hello World SWT - Could not load SWT library [message #754988]
||Sun, 06 November 2011 12:59
Registered: November 2011
I just "installed" Eclipse for RCP and RAP Developers and wanted to do the "Hello World SWT" tutorial.
I am getting the following error when i run the application.
Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-win32-3738 in java.library.path
no swt-win32 in java.library.path
Can't load library: C:\Users\Willem\.swt\lib\win32\x86\swt-win32-3738.dll
Can't load library: C:\Users\Willem\.swt\lib\win32\x86\swt-win32.dll
I think this might has something to do with my %PATH% variable, or my runtime environment , but i'm not really sure.
I downloaded the latest java JDK from the oracle site ( Java SE 7u1 )
I updated my eclipse.ini , as suggested in the newcomers sticky .
My eclipse.ini file looks like this:
I am running windows 7 professional 32 bit.
Any help would be greatly appreciated, thanks in advanced !
[Updated on: Sun, 06 November 2011 14:30]
Report message to a moderator
|Re: Hello World SWT - Could not load SWT library [message #754994 is a reply to message #754988]
||Sun, 06 November 2011 14:16
| Russell Bateman
Registered: July 2009
Location: Provo, Utah, USA
On 2011.11.06 5:59, willem wrote:|
> Hello All,
> I just "installed" Eclipse for RCP and RAP Developers and wanted to do
> the "Hello World SWT" tutorial.
> I updated my eclipse.ini , as suggested in the newcomers sticky .
> My eclipse.ini file looks like this:
> C:\Program Files\Java\jdk1.7.0_01\bin\javaw.exe
> I added the last two lines, but that doesn't seem to do anything.
> I am running windows 7 professional 32 bit.
> Any help would be greatly appreciated, thanks in advanced !
Hey, this may be a little off-topic (i.e.: it may not cure your original
complaint), but I'm pretty sure that you must put
before the -vmargs section in eclipse.ini.
|Re: Hello World SWT - Could not load SWT library [message #762787 is a reply to message #761182]
||Thu, 08 December 2011 16:16
Registered: December 2011
The solution didn't work for me. First it told me that it couldn't add the project that was already there, org.eclipse.swt. So I deleted org.eclipse.swt and org.eclipse.swt.win32.win32.x86 and tried that import again. But it only added org.eclipse.swt and not org.eclipse.swt.win32.win32.x86, which I still had to add again the way the tutorial tells. Not working, so again I tried just deleting org.eclipse.swt and following the "solution" instructions again.|
After another whinge that swt-win32-3738 was not found (even thought it is in Workspace\org.eclipse.swt.win32.win32.x86 as a .dll), I picked on the message
and copied the file there. Now it works. But something doesn't feel right.
Can't load library: .swt\lib\win32\x86\swt-win32-3738.dll
It seems to me that this is not meant to be the solution. If the file belongs there, why wasn't it there in the first place? If it doesn't, my solution is dirty/messy, especially is I have to do the same thing again and again. Anyway, the file is in the root of the project org.eclipse.swt.win32.win32.x86, so why wasn't it used from there? Does it really belong there? Are some paths set wrong? Is the problem in the project itself or in Eclipse?
In short - what is wrong / what am I doing wrong? Help!
Powered by FUDForum
. Page generated in 0.16800 seconds