user1582498
user1582498

Reputation: 35

Unable to execute JAR file on another PC

I have created a Swing GUI using NetBeans, and I am able to execute it on my local machine successfully. But whenever I execute the JAR file gui_test.jar on another PC, it give me the error shown below.

The classes in the package gui_test are:

ERROR

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at gui_test.gui.walk(gui.java:967)
at gui_test.gui.<init>(gui.java:1030)
at gui_test.gui$17.run(gui.java:1030)
at java.awt.event.InvocationEvent.dispatch (Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)

at jaya.awt.Eyentgueue.dispatchEyent(Unknown Source)
at jaya.awt.EyentDispatchIhread.punpOneEyentForFilters(Unknown Source)
at jaya.awt.EyentDispatchIhread.punpEyentsForFilter(Unknown Source)
at jaya.awt.EyentDispatchIhread.punpEyentsForHierarchy(Unknown Source)
at jaya.awt.EyentDispatchIhread.punpEyents(Unknown Source)
at jaya.awt.EyentDispatchIhread.punpEyents(Unknown Source)
at java.awt.EyentDispatchIhread.run(Unknown Source)

Any suggestions to resolve the problem will be appreciated.

Upvotes: 1

Views: 357

Answers (2)

PeakGen
PeakGen

Reputation: 23025

Following are possible.

  1. You have developed it in a new version of Java, and the "other" machine is having an old version
  2. Issues in JRE of the other machine
  3. Problems with the build. Try a clean > rebuild in netbeans

That's all I can think about. Try this in another few machines, which has the same Java version, then only you can get the issue.

Upvotes: 1

La bla bla
La bla bla

Reputation: 8708

I'm not too familiar with Netbeans, But I do recall having problem importing a GUI from Netbeans into eclipse. This is possibly because the Netbeans GUI uses certain libraries.

Check this question, and this answer, it might help you https://stackoverflow.com/a/4498151/975959

Upvotes: 0

Related Questions