File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Affect how Swing app starts? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Affect how Swing app starts?" Watch "Affect how Swing app starts?" New topic
Author

Affect how Swing app starts?

Andy Duplain
Greenhorn

Joined: Jun 20, 2007
Posts: 5
I have the exact same error and this can be easily reproduced by using WindowBuilder Pro within eclipse and creating a new class:

WindowsBuilder -> Swing Designer -> Application Window.

When attempting to Run or Debug the application from inside eclipse, the window is created and the same error messages as the OP are written to the console, but the application doesn't appear to complete initialisation; it just sits there with no menu bar and it's necessary to 'stop' the application from within eclipse.

If I run it from the command prompt however it works fine. Weird.

Any help would be appreciated.

My system: Mac OS 10.6.6, Eclipse 3.6.1 (Helios)
Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)


Here is the code:


Andy Duplain
Greenhorn

Joined: Jun 20, 2007
Posts: 5
Update: the reason it's working from the command line and not from eclipse is that the JVM argument -XStartOnFirstThread is being passed, which breaks Swing apps. This option is otherwise necessary and is defined in eclipse.ini.

The question then becomes: How do I remove this argument when running/debugging my Swing app within eclipse?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Affect how Swing app starts?