0

我在 jre6.0.33+ 中工作的小程序代码中得到了这个堆栈跟踪,但在 7.025 中失败了。谁能帮我理解为什么并纠正?

   Exception in thread "AWT-EventQueue-2" java.lang.NullPointerException
    at sun.awt.SunToolkit.getSystemEventQueueImplPP(Unknown Source)
    at sun.awt.SunToolkit.getSystemEventQueueImplPP(Unknown Source)
    at sun.awt.SunToolkit.getSystemEventQueueImpl(Unknown Source)
    at java.awt.Toolkit.getEventQueue(Unknown Source)
    at java.awt.EventQueue.isDispatchThread(Unknown Source)
    at javax.swing.SwingUtilities.isEventDispatchThread(Unknown Source)
    at javax.swing.JComponent.revalidate(Unknown Source)
    at javax.swing.JTable.resizeAndRepaint(Unknown Source)
    at javax.swing.JTable.sortedTableChanged(Unknown Source)
    at javax.swing.JTable.sorterChanged(Unknown Source)
    at javax.swing.RowSorter.fireRowSorterChanged(Unknown Source)
    at javax.swing.RowSorter.fireRowSorterChanged(Unknown Source)
    at javax.swing.DefaultRowSorter.sort(Unknown Source)
    at sun.swing.FilePane$DetailsTableRowSorter.access$1601(Unknown Source)
    at sun.swing.FilePane$DetailsTableRowSorter$1.call(Unknown Source)
    at sun.swing.FilePane$DetailsTableRowSorter$1.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
4

2 回答 2

0

根据这个论坛帖子,我得到了同样的结果,这显然是这个错误的“化身” 。它似乎已修复,但仅在 JDK8 版本中。OTOH,似乎有一个“Apple补丁”在(大概)JDK 7(但仅适用于Apple用户)中修复了这个问题。

于 2014-04-28T14:22:26.047 回答
0

Mea culpa 是的,我应该避免阅读。问题在于对对话框进行排序。我接受我的功劳惩罚。我希望我仍然可以天真地发帖,尽管他们是。请注意,这不是讽刺,即使该声明处于压力之下。

于 2013-10-02T15:36:10.423 回答