Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SWT Unsatisfied link error



At 19:01 Uhr -0400 27.7.2005, Elliotte Harold wrote:
Exception in thread "main" java.lang.InternalError: Can't start the AWT because Java was started on the first thread. Make sure StartOnFirstThread is not specified in your application's Info.plist or on the command line

This mean anything to anybody? Google finds quite a few scattered hits on this, but none that clearly tell me how to solve the problem. Looking them over this appears like it might be a known Apple VM bug.

Running SWT on Mac OS X requires to run the Apple VM as the first thread because on Mac OS only the first thread can serve the UI. Since SWT is just a normal Carbon application with its own event loop, it needs to run on the first thread. However, Apple runs the Java VM on the second thread (because the first runs the default event loop and the AWT thread talks to it via magic).


We run SWT by using the -XStartOnFirstThread command line argument. However, on Mac OS X the Java VM normally runs in the second thread (and AWT checks for this). So if you get a message "Can't start the AWT..." this typically means that you try to run SWT and AWT at the same time. This is not yet possible. See bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=67384 for details.
(If you only need AWT for non-interactive stuff, you can try AWT's headless mode. This should work fine with SWT)


--andre
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >SWT Unsatisfied link error (From: Elliotte Harold <email@hidden>)
 >Re: SWT Unsatisfied link error (From: Elliotte Harold <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.