Darwin OpenJDK 7 Binaries - Not Working With SWT

Mike Swingler swingler at apple.com
Sun Sep 7 12:01:28 PDT 2008


On Sep 7, 2008, at 9:09 AM, Michael Franz wrote:

> Hi,
>
> I downloaded and tried to use the Darwin OpenJDK 7 binaries with the  
> Eclipse 3.4 Samples.  This uses all of the SWT components.  The  
> application will not start as the JVM does not understand the - 
> XstartOnFirstThread flag.
>
> There error message is:
> Unrecognized option: -XstartOnFirstThread
> Error: Could not create the Java Virtual Machine.
> Error: A fatal exception has occurred. Program will exit.
>
> I have not been able to figure out what this option does, I think it  
> has something to do with the integration between AWT and SWT and the  
> EDT.

This is because OpenJDK7 does not have a Cocoa-based AWT that must  
start on thread 0 to receive events from the OS. If you simply remove  
the -XstartOnFirstThread argument, or apply a patch to OpenJDK (which  
I believe SoyLatte did) to ignore this "VM flag", everything should  
start fine.

Mike Swingler
Java Runtime Engineer
Apple Inc.



More information about the bsd-port-dev mailing list