LWJGL, Eclipse/SWT and Mac OS X 10.5 (Leopard)

Started by Jens v.P., November 15, 2007, 13:45:54

Previous topic - Next topic

Jens v.P.

Hi,

after updating from Mac OS X 10.4 (Tiger) to 10.5 (Leopard), my LWJGL Test plugin (see http://lwjgl.org/forum/index.php/topic,2379.15.html) for Eclipse is not working anymore. This is the error message:

Unhandled event loop exception
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

The error is caused by
  Toolkit.getDefaultToolkit()
which is called in
  org.lwjgl.MacOSXSysImplementation

I know -- there is the old SWT/AWT problem under Mac OS X. But: LWJGL isn't really using AWT, is it?
Why is the AWT toolkit loaded? Is it possible to remove that line?

Jens

P.S.: I also wrote a mail to Apple's java developer mailing list, maybe they can solve the problem since the plugin worked with Tiger, so Apple has obviously changed something that broke my code. Besides, the plugin is still working when started from a second Eclipse instance, i.e. a runtime instance in run or debug mode.


princec

Yikes. Does this mean my games are broken too?

Cas :)

Jens v.P.

@princec: No, the only broken thing is the AWT-SWT combination. That is, only if you are using LWJGL in combination with some SWT stuff you would have a problem.

Jens v.P.

I have just received an answer from Scott Kovatch (from Apple):
Quote
This is a bug in Eclipse's launcher that we inadvertently caused in Leopard. You can track the resolution here:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=199020 

It was released into the 3.3.2 stream, but you can grab an integration build with the fix right now.

I know this has been a pain for you and many others, and we apologize for the problem.

But, anyway: Why is the AWT toolkit loaded by LWJGL at this point?

Matzon

We use AWT on mac because the JRE is always available. There is no need for custom versions without AWT included.

We also use AWT on linux due to isseus with X only being thread safe for 1 thread per process (the Java VM being 1 process).