我使用netbeans构建了一个GUI,当我使用它的jar文件运行它时,在几次操作后它会卡住,抛出AbstractMethodError
然后抛出很多NullPointerException
个。这是以随机的方式进行的,并且在从JComboBox
中选择一个项目或在JTextPane
组件中编辑文本几次之后。当我通过NetBeans运行GUI时,它运行正常,没有错误。 jar也可以在不同的计算机上正常运行(问题发生的次数较少)。
你们/女士们是否知道这个问题的根源是什么,或者我该怎么做才能找到它?
堆栈跟踪:
Exception in thread "AWT-EventQueue-0"
Exception in thread "AWT-EventQueue-0"
java.lang.AbstractMethodError: java.lang.Throwable.printStackTrace(Ljava / io / PrintStream;) V
at java.lang.ThreadGroup.uncaughtException(Unknown Source)
at java.lang.ThreadGroup.uncaughtException(Unknown Source)
at java.awt.EventDispatchThread.processException(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)
Exception in thread "AWT-EventQueue-0"
Exception in thread "AWT-EventQueue-0"
java.lang.NullPointerException
at java.lang.ThreadGroup.uncaughtException(Unknown Source)
at java.lang.ThreadGroup.uncaughtException(Unknown Source)
at java.awt.EventDispatchThread.processException(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)