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

  • Home
  • SEARCH
  • 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 6074183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:21:13+00:00 2026-05-23T10:21:13+00:00

I am trying to get a hello world SWT application going: public static void

  • 0

I am trying to get a hello world SWT application going:

public static void main(String args[]) throws IOException{
    Display display = new Display ();
    Shell shell = new Shell(display);
    shell.open ();
    while (!shell.isDisposed ()) {
        if (!display.readAndDispatch ()) display.sleep ();
    }
    display.dispose ();
}

But I keep getting the following exception. I have the macosx version of org.eclipse.swt.carbon being used with eclipse/maven. Has anyone seen this before?

Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-carbon-3346 or swt-carbon in swt.library.path, java.library.path or the jar file
    at org.eclipse.swt.internal.Library.loadLibrary(Library.java:219)
    at org.eclipse.swt.internal.Library.loadLibrary(Library.java:151)
    at org.eclipse.swt.internal.C.<clinit>(C.java:21)
    at org.eclipse.swt.widgets.Display.createDisplay(Display.java:943)
    at org.eclipse.swt.widgets.Display.create(Display.java:937)
    at org.eclipse.swt.graphics.Device.<init>(Device.java:119)
    at org.eclipse.swt.widgets.Display.<init>(Display.java:749)
    at org.eclipse.swt.widgets.Display.<init>(Display.java:740)
    at com.wuntee.aat.command.adb.LogCat.main(LogCat.java:30)
  • 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-05-23T10:21:14+00:00Added an answer on May 23, 2026 at 10:21 am

    SWT is implemented using native UI libraries – in this case, the Mac Carbon libraries – and requires some JNI code to marshal the SWT calls to the native Carbon calls. Loading JNI libraries is a little bit different than normal classloading (the dynamic libraries must first be loaded with System#loadLibrary).

    First, if you’re on a 64 bit machine, make sure that you’re passing the -d32 argument to the JRE. (ie, java -d32 MyTestClass). The Carbon SWT libraries are 32 bit only and will not load on a 64 bit runtime.

    By default, SWT tries to load the .jnilib dynamic libraries from a JAR file in your classpath – the library libswt-carbon-3346.jnilib should be in your org.eclipse.swt.carbon.macosx... JAR. SWT will try to unzip this jnilib from your JAR into a temporary location and load that.

    If it can’t do this for whatever reason (java.io.tmpdir isn’t writable, for example) then this will fail. To work around this, you should extract libswt-carbon-3346.jnilib from the org.eclipse.swt.carbon.macosx JAR and follow the instructions that the exception provided. (For example, set swt.library.path to the location of that jnilib.)

    Unrelated to your actual question: you’re using SWT 3.3. A lot of changes have been made since then, including the (likely preferable) Cocoa support. Upgrading to the newest SWT libraries in the newest Eclipse may be very helpful.

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

Sidebar

Related Questions

I'm trying to get a Hello World application compiled for an ARM target. I'm
I'm trying to get the 'hello world' of streaming responses working for Django (1.2).
I'm trying to get 'hello world' working on the Android SDK with Eclipse. I'm
I'm trying to get the hello world div to be at the bottom of
I've been trying to get a simple hello world web app running on Sinatra.
Trying to get an ASP application deployed; it worked for a while but then
I'm an Eclipse newbie and I'm trying to build a mixed AWT/SWT application. Here's
I am trying to get the following setup up going. Flatpages: Where all my
I am trying to get dynamic select menu's working in my Rails application. I
I compile this program: #include <stdio.h> int main() { printf(Hello World!); return 0; }

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.