tags:

views:

101

answers:

1

I have a Java application that launches multiple windows (JFrames). It works fine when I'm running it from the command line. But after packaging the app in a JAR and running it from the JAR, not all of the windows open.

Does anyone know why this could be happening? Is there something about JAR files that prevent opening multiple windows? Google hasn't been helpful with this one ;)

If there is a simple solution, I'd love to hear about it. In the mean time, I'm considering using the Multiple Document Interface so that I can add and remove windows to the MDI while only having a single top level container.

A: 

Nothing about launching from a jar should have anything to do with opening multiple JFrames. Is there any file/resource reading going on? Maybe you're not reading the resources properly from the jar and an exception is crashing one of your threads. I would also add an UncaughtExceptionHandler to see if that is happening.

Jeff Storey
Good point. I'll add more error handling code and see what that shakes loose.
nedlud