I have a program that works perfectly when on my computer but throws exceptions when put into an executable jar.
When the jar is executing a JFrame pops up, with 3 buttons, asking to join a game, host a game, or go into the option menu. Now when you click on one what should happen is that a JPanel is created which is added to the center of the JFrame's Borderlayout. But when this program is in a Jar instead i get a nullpointer exeception. What makes this even weirder is that the exeception is only thrown after the first click. For instance, i click on Join once, and nothing happens, no exception, no new JPanel. Click it again, and then the exception is thrown.
I have a feeling i don't know something about jar's and am making a basic mistake. Help
The following is the Exception thrown and its printStackTrace()
Exception thrown: java.lang.NullPointerException
java.lang.Thread.dumpThreads(Native Method)
java.lang.Thread.getStackTrace(Unknown Source)
com.RoT.utils.Console.reportError(Console.java:94)
com.RoT.setup.SetupScreen$ButtonPanel.actionPerformed(SetupScreen.java:85)
javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
javax.swing.DefaultButtonModel.setPressed(Unknown Source)
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
java.awt.Component.processMouseEvent(Unknown Source)
javax.swing.JComponent.processMouseEvent(Unknown Source)
java.awt.Component.processEvent(Unknown Source)
java.awt.Container.processEvent(Unknown Source)
java.awt.Component.dispatchEventImpl(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Window.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.EventQueue.dispatchEvent(Unknown Source)
java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.run(Unknown Source)