我已经使用 NetBeans 创建了一个 Swing GUI,并且能够在我的本地计算机上成功执行它。但是,每当我在另一台 PC 上执行 JAR 文件gui_test.jar
时,都会出现如下所示的错误。
包中的类gui_test
是:
- gui.gui
- StreamGobbler.java
错误
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)
任何解决问题的建议将不胜感激。