Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8708765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:12:52+00:00 2026-06-13T04:12:52+00:00

I was following the tutorial that came in the Eclipse editor (click Help ->

  • 0

I was following the tutorial that came in the Eclipse editor (click Help -> Welcome -> Tutorials). I worked through all the steps which were:

This cheat sheet shows you how to create a “Hello World” application
that uses the Standard Widget Toolkit (SWT). The application will
simply display an empty window to the user. If you need help at any
step, click the (?) to the right. Let’s get started!

If you’re not already in the Java perspective, in the main menu select
Window > Open Perspective > Java or click on the “Click to Perform”
link below.

Open the Import wizard from the main menu via File > Import…, and
select Plug-in Development > Plug-ins and Fragments. Click Next. On
the Import Plug-ins and Fragments page, select Import from: The
active target platform. Plug-ins and Fragments to import: Select from
all plug-ins and fragments found at specified location. Import As:
Projects with source folders. Click Next. On the Selection page, Add
org.eclipse.swt.{platform}.{os}.{arch} (for example:
org.eclipse.swt.win32.win32.x86 for win32) to Plug-ins and Fragments
to Import: list. Click Finish. This will create the
org.eclipse.swt.{platform}.{os}.{arch} project which we will need to
compile and run the application.

Now we need a project to store our own source code. In the main
toolbar, click on the New Java Project button, or click on the link
below. Enter HelloWorldSWT for the project name, then click Finish.

Since our project requires SWT, we need to specify this in the project
properties. Right-click on the project and select Properties. In the
Java Build Path page open the Projects tab, add the
org.eclipse.swt.{platform}.{os}.{arch} project, then click OK.

The next step is to create a new class. In the main toolbar, click on
the New Java Class button (or the link below). If not already
specified, select HelloWorldSWT/src as the source folder. Enter
HelloWorldSWT for the class name and select the checkbox to create the
main() method, then click Finish. The Java editor will automatically
open showing your new class.

In the Java editor, enter the following Java code in the main()
method: Display display = new Display(); Shell shell = new
Shell(display); shell.setText(“Hello world!”); shell.open(); while
(!shell.isDisposed()) { if (!display.readAndDispatch())
display.sleep(); } display.dispose(); You will get compile errors.
Right click in the Java editor and select Source > Organize Imports,
then save your changes.

To run your application, right-click on your class in the Package
Explorer and select Run As > Java Application. A new empty window
should appear with the title “Hello world!”. Congratulations! You have
successfully created a Hello World SWT application!

And here’s a screenshot:

screenshot

But when I tried to run the program, instead of displaying a blank screen as expected, it dumped this in the terminal:

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

at org.eclipse.swt.internal.Library.loadLibrary(Library.java:331)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:240)
at org.eclipse.swt.internal.C.<clinit>(C.java:21)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:101)
at HelloWorldSWT.main(HelloWorldSWT.java:11

I’m using an x64 system with the 64-bit Eclipse installed and both 32-bit and 64-bit versions of Java (I think). Please help. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T04:12:53+00:00Added an answer on June 13, 2026 at 4:12 am

    Source: Eclipse Forums

    This worked for me:

    • Right-click on your your project folder HelloWorldSWT;

    • Go to Properties -> Left Sidebar Java Build Path -> Tab Projects;

    • Expand the org.eclipse.swt.cocoa.macosx.x86_64 folder by clicking on the arrow left to it;

    • Select Native library location and click Edit;

    • Click the Workspace button and select org.eclipse.swt.cocoa.macosx.x86_64;

    • Click OK a couple of times;

    And you’re done! Hope this helped.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am going through a tutorial that mentions the following method: -(void)layoutSubviews located in
While going through a Zend tutorial , I came across the following statement: Note
I'm following a simple tutorial that creates a class which extends from SQLiteOpenHelper and
I tried the following example code from the tutorial that came along wxPython2.8 Docs
I've been following a tutorial that explains how to use background for a button
I'm following this tutorial on building a widget IN that tutorial, he's testing whether
I was following a tutorial and i noticed that there was a linearlayout that
This is a tutorial I've been following and I've done everything that it tells
Taking a rails tutorial, and I've run into the following problem that I'm having
It seems that the following is a common method given in many tutorials on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.