默认
发表评论 1
想开发IM:买成品怕坑?租第3方怕贵?找开源自已撸?尽量别走弯路了... 找站长给点建议
在IDEA里运行没问题,但是打包成jar后运行报错
阅读(28157) | 评论(1 收藏 淘帖
如题,在IDEA里运行没任何问题,但是打包成jar后运行就出错,出错信息:Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at org.jb2011.lnf.beautyeye.ch1_titlepane.BETitlePane.paintComponent(BET
itlePane.java:1018)
        at java.desktop/javax.swing.JComponent.paint(Unknown Source)
        at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
        at java.desktop/javax.swing.JComponent.paint(Unknown Source)
        at java.desktop/javax.swing.JLayeredPane.paint(Unknown Source)
        at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
        at java.desktop/javax.swing.JComponent.paintToOffscreen(Unknown Source)
        at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffe
redImpl(Unknown Source)
        at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffe
red(Unknown Source)
        at java.desktop/javax.swing.RepaintManager$PaintManager.paint(Unknown So
urce)
        at java.desktop/javax.swing.RepaintManager.paint(Unknown Source)
        at java.desktop/javax.swing.JComponent.paint(Unknown Source)
        at java.desktop/java.awt.GraphicsCallback$PaintCallback.run(Unknown Sour
ce)
        at java.desktop/sun.awt.SunGraphicsCallback.runOneComponent(Unknown Sour
ce)
        at java.desktop/sun.awt.SunGraphicsCallback.runComponents(Unknown Source
)
        at java.desktop/java.awt.Container.paint(Unknown Source)
        at java.desktop/java.awt.Window.paint(Unknown Source)
        at java.desktop/javax.swing.RepaintManager$4.run(Unknown Source)
        at java.desktop/javax.swing.RepaintManager$4.run(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doInt
ersectionPrivilege(Unknown Source)
        at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Sou
rce)
        at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Sou
rce)
        at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(Unknown
Source)
        at java.desktop/javax.swing.RepaintManager.access$1200(Unknown Source)
        at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(Unknow
n Source)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.desktop/java.awt.EventQueue.access$600(Unknown Source)
        at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
        at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doInt
ersectionPrivilege(Unknown Source)
        at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unkn
own Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown
Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unkn
own Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at org.jb2011.lnf.beautyeye.ch1_titlepane.BETitlePane.paintComponent(BET
itlePane.java:1018)
        at java.desktop/javax.swing.JComponent.paint(Unknown Source)
        at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
        at java.desktop/javax.swing.JComponent.paint(Unknown Source)
        at java.desktop/javax.swing.JLayeredPane.paint(Unknown Source)
        at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
        at java.desktop/javax.swing.JComponent.paint(Unknown Source)
        at java.desktop/javax.swing.JComponent.paintToOffscreen(Unknown Source)
        at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffe
redImpl(Unknown Source)
        at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffe
red(Unknown Source)
        at java.desktop/javax.swing.RepaintManager$PaintManager.paint(Unknown So
urce)
        at java.desktop/javax.swing.RepaintManager.paint(Unknown Source)
        at java.desktop/javax.swing.JComponent._paintImmediately(Unknown Source)

        at java.desktop/javax.swing.JComponent.paintImmediately(Unknown Source)
        at java.desktop/javax.swing.RepaintManager$4.run(Unknown Source)
        at java.desktop/javax.swing.RepaintManager$4.run(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doInt
ersectionPrivilege(Unknown Source)
        at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Sou
rce)
        at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Sou
rce)
        at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(Unknown
Source)
        at java.desktop/javax.swing.RepaintManager.access$1200(Unknown Source)
        at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(Unknow
n Source)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.desktop/java.awt.EventQueue.access$600(Unknown Source)
        at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
        at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doInt
ersectionPrivilege(Unknown Source)
        at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unkn
own Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown
Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unkn
own Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at org.jb2011.lnf.beautyeye.ch1_titlepane.BETitlePane.paintComponent(BET
itlePane.java:1018)
        at java.desktop/javax.swing.JComponent.paint(Unknown Source)
        at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
        at java.desktop/javax.swing.JComponent.paint(Unknown Source)
        at java.desktop/javax.swing.JLayeredPane.paint(Unknown Source)
        at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
        at java.desktop/javax.swing.JComponent.paint(Unknown Source)
        at java.desktop/javax.swing.JComponent.paintToOffscreen(Unknown Source)
        at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffe
redImpl(Unknown Source)
        at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffe
red(Unknown Source)
        at java.desktop/javax.swing.RepaintManager$PaintManager.paint(Unknown So
urce)
        at java.desktop/javax.swing.RepaintManager.paint(Unknown Source)
        at java.desktop/javax.swing.JComponent._paintImmediately(Unknown Source)

        at java.desktop/javax.swing.JComponent.paintImmediately(Unknown Source)
        at java.desktop/javax.swing.RepaintManager$4.run(Unknown Source)
        at java.desktop/javax.swing.RepaintManager$4.run(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doInt
ersectionPrivilege(Unknown Source)
        at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Sou
rce)
        at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Sou
rce)
        at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(Unknown
Source)
        at java.desktop/javax.swing.RepaintManager.access$1200(Unknown Source)
        at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(Unknow
n Source)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.desktop/java.awt.EventQueue.access$600(Unknown Source)
        at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
        at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doInt
ersectionPrivilege(Unknown Source)
        at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unkn
own Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown
Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unkn
own Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)


之后界面外观透明,控件不可见,但是当控件获得焦点时会出现。
对了,在演示demo里直接运行演示demo的jar也会报这个错误。

即时通讯网 - 即时通讯开发者社区! 来源: - 即时通讯开发者社区!

上一篇:中文颜色较灰如何解决?下一篇:对于使用内嵌浏览器弹出新的tab页外观样式失效
推荐方案
评论 1
对比一下,IDEA里运行时JDK的版本你打成jar包后的jdk运行环境
打赏楼主 ×
使用微信打赏! 使用支付宝打赏!

返回顶部