Obviously, your main method is not executing in the main thread. In the stack trace, you can see that the launcher starts in another thread, and then Launcher indirectly calls main . This, unfortunately, is just a diagnosis, I'm not sure about the solution. I did a similar thing (SWT application via Java Web Start), but I donโt remember how we decided, if at all.
After checking the com.sun.javaws.Launcher source code, it is completely unclear how this could be made to work. The Launcher.launch method launches a new thread in which your main method runs. You can follow the code to recreate the exact stack you get.
The main entry point to Java Web Start shows that the main thread dies shortly after launch.
Update
I dug up something: this Eclipse error report suggests that the problem may be related to this:
<resources> <j2se version="1.4+" /> <jar href="client.jar" /> </resources>
The parser uses the j2se specification here and ignores the later, more specific ones. Try deleting the line <j2se...
Update 2
Now I dug this from here :
com.apple.concurrent.Dispatch.getInstance().getNonBlockingMainQueueExecutor().execute( new Runnable() { public void run() { final Display display = Display.getDefault(); while (!display.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } });
It actually looks like something workable. It does exactly what I described in my comment below: fixes to the main thread through a mechanism specifically created for this purpose. Try to adapt this to your needs. You might not even need -XstartOnFirstThread with this.
Update 3
I finally found my old SWT-JWS project. He got it in him:
<resources os="Mac OS X" arch="x86_64"> <j2se version="1.6+" java-vm-args="-XstartOnFirstThread"/> <jar href="swt-cocoa-macosx-x86-64-3.6.2.jar" /> </resources>
and it works. It does not have a j2se default j2se , this element is only displayed in an OSX-specific entry.