Skip to main content



      Home
Home » Archived » Eclipse Examples » SWT Hello World fails(SWT Hello World fails on Indigo, works on Helios)
SWT Hello World fails [message #707841] Tue, 02 August 2011 01:58 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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] by Moderator

Re: SWT Hello World fails [message #892437 is a reply to message #720661] Thu, 28 June 2012 04:35 Go to previous messageGo to next message
Eclipse UserFriend
So best answer is (works for Eclipse Juno too) :

Pete wrote on Wed, 24 August 2011 07:03
Had 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] by Moderator

Re: SWT Hello World fails [message #915962 is a reply to message #892437] Tue, 18 September 2012 05:56 Go to previous messageGo to next message
Eclipse UserFriend
Thank you, fixed it!
Re: SWT Hello World fails [message #1061309 is a reply to message #892437] Fri, 31 May 2013 03:08 Go to previous messageGo to next message
Eclipse UserFriend
Laughing
Thank you so much. It finally worked.
Re: SWT Hello World fails [message #1066525 is a reply to message #707841] Tue, 02 July 2013 19:18 Go to previous messageGo to next message
Eclipse UserFriend
Same problem - fix posted by Sébastien GUÉRIN (petes) worked.
Win 7 pro 64.
Pretty sure I followed the tutorial accurately, have we all gone wrong or is there an issue with the tutorial and Win 7?
icon10.gif  Re: SWT Hello World fails [message #1072919 is a reply to message #892437] Tue, 23 July 2013 15:23 Go to previous messageGo to next message
Eclipse UserFriend
absolute newbie thanks immensely
Re: SWT Hello World fails [message #1212966 is a reply to message #1066525] Tue, 26 November 2013 22:59 Go to previous message
Eclipse UserFriend
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}.
Previous Topic:Batch Program Sample
Next Topic:Maven for Eclipse Juno
Goto Forum:
  


Current Time: Mon Mar 17 18:30:48 EDT 2025

Powered by FUDForum. Page generated in 0.04232 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top