nedlud
nedlud

Reputation: 1832

multiple JFrames from JAR

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.

Upvotes: 0

Views: 734

Answers (1)

Jeff Storey
Jeff Storey

Reputation: 57202

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.

Upvotes: 1

Related Questions