Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » hello world swt
hello world swt [message #783198] Wed, 25 January 2012 09:15 Go to next message
auger pierre is currently offline auger pierreFriend
Messages: 2
Registered: January 2012
Junior Member
i am a newcomer to eclipse and i try to study the hello world swt tut but when i run the tut i get the error:
The project: org.eclipse.swt.win32.win32.x86_3.7.1.v3738a which is referenced by the classpath, does not exist.
i don't understand because i have the the project:org.eclipse.swt.win32.win32.x86
in the package explorer
help me please
Re: hello world swt [message #988419 is a reply to message #783198] Thu, 29 November 2012 20:41 Go to previous messageGo to next message
Daniel Naftalovich is currently offline Daniel NaftalovichFriend
Messages: 1
Registered: November 2012
Junior Member
I am having a similar problem:

The HelloWorldSWT tutorial does not work for me.

I am using a brand new out-of-the-box MacBookPro with Retina Display, 13", with i7.
My library is org.eclipse.swt,cocoa.macosx.x86

The following errors appear in the console when trying to compile:

Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-cocoa-4234 in java.library.path
no swt-cocoa in java.library.path
Can't load library: /Users/Nafty/.swt/lib/macosx/x86_64/libswt-cocoa-4234.jnilib
Can't load library: /Users/Nafty/.swt/lib/macosx/x86_64/libswt-cocoa.jnilib

at org.eclipse.swt.internal.Library.loadLibrary(
at org.eclipse.swt.internal.Library.loadLibrary(
at org.eclipse.swt.internal.C.<clinit>(
at org.eclipse.swt.widgets.Display.<clinit>(
at HelloWorldSWT.main(
Re: hello world swt [message #988657 is a reply to message #988419] Fri, 30 November 2012 22:10 Go to previous messageGo to next message
Steve Blass is currently offline Steve BlassFriend
Messages: 276
Registered: July 2009
Senior Member
The tutorial instructions still leave out adding the SWT jar to the project libraries. Here's one way to do it.
Right click your project, choose Properties.
Select Java Build Path.
Select the Libraries tab and click the 'Add External Jars' button.
Now find your eclipse installation folder, /pathtoeclipse/eclipse, and drill down into the 'plugins' folder.
Find and highlight the org.eclipse.swt.[os].[arch].v4233d.jar file and click OK (or Open as the case may be).

Now you have a referenced libraries entry for the swt jar in your project and you should be able to run HelloWorldSWT.

Here's another way to add the reference -

Re: hello world swt [message #1702280 is a reply to message #783198] Tue, 21 July 2015 09:50 Go to previous message
Samuel Ng is currently offline Samuel NgFriend
Messages: 1
Registered: July 2015
Junior Member
I resolved this by moving C:\Program Files\eclipse to C:\eclipse

Answer also found here, Eclipse Mars: ANT Task references missing SWT library
Previous Topic:SWT Browser Issue
Next Topic:Which Eclipse Mars for PyDev
Goto Forum:

Current Time: Sat Jan 23 18:09:33 GMT 2021

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

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

Back to the top