eclipse 里运行:https://blob.steamcn.com/forum/201801/10/010714dv7lyf3ccv1161cp.png
jar 运行: https://blob.steamcn.com/forum/201801/10/010722plhe3hhh7w3hwhrd.png
cmd java -jar 错误如下一直循环 Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at sun.awt.SunToolkit.getImageFromHash(Unknown Source) at sun.awt.SunToolkit.getImage(Unknown Source) at Source.Plane.drawPlane(Plane.java:31) at Source.myFrame.paint(myFrame.java:102) at javax.swing.RepaintManager$4.run(Unknown Source) at javax.swing.RepaintManager$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source) at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source) at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source) at javax.swing.RepaintManager.access$1200(Unknown Source) at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(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$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)
1
Bryan0Z 2018-01-10 01:21:57 +08:00 via Android
你这个异常排版看的头疼,截个图吧,目测是路径问题
|
2
flynaj 2018-01-10 10:52:06 +08:00 via Android
这个是 java 的特性,一处编写,到处调试
|
3
sutra 2018-01-11 15:41:24 +08:00
StackTrace 不完整,看不出来,只能看到个 NPE。
|