Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Affect how Swing app starts?

 
Andy Duplain
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic