| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 3369 人关注过本帖
标题:jar文件运行问题
只看楼主 加入收藏
ssl002
Rank: 2
等 级:论坛游民
威 望:2
帖 子:75
专家分:43
注 册:2017-6-13
结帖率:100%
收藏
 问题点数:0 回复次数:11 
jar文件运行问题
C:\Users\Administrator>java -jar D:\我的游戏\我的教学游戏\LoneBall.jar
Error while reading:welcome.png
java.lang.IllegalArgumentException: input == null!
        at javax.imageio.ImageIO.read(ImageIO.java:1348)
        at com.jamescho.game.main.Resources.loadImage(Resources.java:36)
        at com.jamescho.game.main.Resources.load(Resources.java:19)
        at com.jamescho.game.state.LoadState.init(LoadState.java:13)
        at com.jamescho.game.main.Game.setCurrentState(Game.java:38)
        at com.jamescho.game.main.Game.addNotify(Game.java:47)
        at java.awt.Container.addNotify(Container.java:2776)
        at javax.swing.JComponent.addNotify(JComponent.java:4740)
        at java.awt.Container.addNotify(Container.java:2776)
        at javax.swing.JComponent.addNotify(JComponent.java:4740)
        at java.awt.Container.addNotify(Container.java:2776)
        at javax.swing.JComponent.addNotify(JComponent.java:4740)
        at javax.swing.JRootPane.addNotify(JRootPane.java:757)
        at java.awt.Container.addNotify(Container.java:2776)
        at java.awt.Window.addNotify(Window.java:770)
        at java.awt.Frame.addNotify(Frame.java:487)
        at java.awt.Window.pack(Window.java:807)
        at com.jamescho.game.main.GameMain.main(GameMain.java:17)
Error while reading:iconimage.png
java.lang.IllegalArgumentException: input == null!
        at javax.imageio.ImageIO.read(ImageIO.java:1348)
        at com.jamescho.game.main.Resources.loadImage(Resources.java:36)
        at com.jamescho.game.main.Resources.load(Resources.java:20)
        at com.jamescho.game.state.LoadState.init(LoadState.java:13)
        at com.jamescho.game.main.Game.setCurrentState(Game.java:38)
        at com.jamescho.game.main.Game.addNotify(Game.java:47)
        at java.awt.Container.addNotify(Container.java:2776)
        at javax.swing.JComponent.addNotify(JComponent.java:4740)
        at java.awt.Container.addNotify(Container.java:2776)
        at javax.swing.JComponent.addNotify(JComponent.java:4740)
        at java.awt.Container.addNotify(Container.java:2776)
        at javax.swing.JComponent.addNotify(JComponent.java:4740)
        at javax.swing.JRootPane.addNotify(JRootPane.java:757)
        at java.awt.Container.addNotify(Container.java:2776)
        at java.awt.Window.addNotify(Window.java:770)
        at java.awt.Frame.addNotify(Frame.java:487)
        at java.awt.Window.pack(Window.java:807)
        at com.jamescho.game.main.GameMain.main(GameMain.java:17)
Error while reading:line.png
java.lang.IllegalArgumentException: input == null!
        at javax.imageio.ImageIO.read(ImageIO.java:1348)
        at com.jamescho.game.main.Resources.loadImage(Resources.java:36)
        at com.jamescho.game.main.Resources.load(Resources.java:21)
        at com.jamescho.game.state.LoadState.init(LoadState.java:13)
        at com.jamescho.game.main.Game.setCurrentState(Game.java:38)
        at com.jamescho.game.main.Game.addNotify(Game.java:47)
        at java.awt.Container.addNotify(Container.java:2776)
        at javax.swing.JComponent.addNotify(JComponent.java:4740)
        at java.awt.Container.addNotify(Container.java:2776)
        at javax.swing.JComponent.addNotify(JComponent.java:4740)
        at java.awt.Container.addNotify(Container.java:2776)
        at javax.swing.JComponent.addNotify(JComponent.java:4740)
        at javax.swing.JRootPane.addNotify(JRootPane.java:757)
        at java.awt.Container.addNotify(Container.java:2776)
        at java.awt.Window.addNotify(Window.java:770)
        at java.awt.Frame.addNotify(Frame.java:487)
        at java.awt.Window.pack(Window.java:807)
        at com.jamescho.game.main.GameMain.main(GameMain.java:17)
Exception in thread "main" java.lang.NullPointerException
        at sun.applet.AppletAudioClip.<init>(AppletAudioClip.java:65)
        at java.applet.Applet.newAudioClip(Applet.java:313)
        at com.jamescho.game.main.Resources.loadSound(Resources.java:30)
        at com.jamescho.game.main.Resources.load(Resources.java:22)
        at com.jamescho.game.state.LoadState.init(LoadState.java:13)
        at com.jamescho.game.main.Game.setCurrentState(Game.java:38)
        at com.jamescho.game.main.Game.addNotify(Game.java:47)
        at java.awt.Container.addNotify(Container.java:2776)
        at javax.swing.JComponent.addNotify(JComponent.java:4740)
        at java.awt.Container.addNotify(Container.java:2776)
        at javax.swing.JComponent.addNotify(JComponent.java:4740)
        at java.awt.Container.addNotify(Container.java:2776)
        at javax.swing.JComponent.addNotify(JComponent.java:4740)
        at javax.swing.JRootPane.addNotify(JRootPane.java:757)
        at java.awt.Container.addNotify(Container.java:2776)
        at java.awt.Window.addNotify(Window.java:770)
        at java.awt.Frame.addNotify(Frame.java:487)
        at java.awt.Window.pack(Window.java:807)
        at com.jamescho.game.main.GameMain.main(GameMain.)
这是cmd运行后的结果,有大佬帮忙看下出了什么问题吗?谢谢谢谢!!!!!!!
搜索更多相关主题的帖子: java com main awt Container 
2019-02-28 19:30
ssl002
Rank: 2
等 级:论坛游民
威 望:2
帖 子:75
专家分:43
注 册:2017-6-13
收藏
得分:0 
在线等!
2019-02-28 19:34
林月儿
Rank: 16Rank: 16Rank: 16Rank: 16
来 自:湖南
等 级:版主
威 望:138
帖 子:2277
专家分:10647
注 册:2015-3-19
收藏
得分:0 
估计是空值异常吧,你是要改源码还是咋地

剑栈风樯各苦辛,别时冰雪到时春
2019-02-28 20:38
幻紫灵心
Rank: 11Rank: 11Rank: 11Rank: 11
来 自:山咔咔里面
等 级:贵宾
威 望:53
帖 子:396
专家分:2640
注 册:2018-3-30
收藏
得分:0 
Error while reading:welcome.png
读不到图呗...

saber,别哭.
2019-02-28 21:23
ssl002
Rank: 2
等 级:论坛游民
威 望:2
帖 子:75
专家分:43
注 册:2017-6-13
收藏
得分:0 
啊!原代码太长了QAQ
2019-02-28 21:36
ssl002
Rank: 2
等 级:论坛游民
威 望:2
帖 子:75
专家分:43
注 册:2017-6-13
收藏
得分:0 
空值异常是个什么鬼啊?!
2019-02-28 21:43
ssl002
Rank: 2
等 级:论坛游民
威 望:2
帖 子:75
专家分:43
注 册:2017-6-13
收藏
得分:0 
赶脚时图片问题啊,不像是什么空值异常!
2019-02-28 21:50
林月儿
Rank: 16Rank: 16Rank: 16Rank: 16
来 自:湖南
等 级:版主
威 望:138
帖 子:2277
专家分:10647
注 册:2015-3-19
收藏
得分:0 
       at javax.swing.JRootPane.addNotify(JRootPane.java:757)
        at java.awt.Container.addNotify(Container.java:2776)
        at java.awt.Window.addNotify(Window.java:770)
        at java.awt.Frame.addNotify(Frame.java:487)
        at java.awt.Window.pack(Window.java:807)
        at com.jamescho.game.main.GameMain.main(GameMain.java:17)
Exception in thread "main" java.lang.NullPointerException
        at sun.applet.AppletAudioClip.<init>(AppletAudioClip.java:65)
        at java.applet.Applet.newAudioClip(Applet.java:313)
        at com.jamescho.game.main.Resources.loadSound(Resources.java:30)
        at com.jamescho.game.main.Resources.load(Resources.java:22)
        at com.jamescho.game.state.LoadState.init(LoadState.java:13)
        at com.jamescho.game.main.Game.setCurrentState(Game.java:38)
        at com.jamescho.game.main.Game.addNotify(Game.java:47)
        at java.awt.Container.addNotify(Container.java:2776)
        at javax.swing.JComponent.addNotify(JComponent.java:4740)
        at java.awt.Container.addNotify(Container.java:2776)
        at javax.swing.JComponent.addNotify(JComponent.java:4740)
        at java.awt.Container.addNotify(Container.java:2776)
        at javax.swing.JComponent.addNotify(JComponent.java:4740)
        at javax.swing.JRootPane.addNotify(JRootPane.java:757)
        at java.awt.Container.addNotify(Container.java:2776)
        at java.awt.Window.addNotify(Window.java:770)
        at java.awt.Frame.addNotify(Frame.java:487)
        at java.awt.Window.pack(Window.java:807)
        at com.jamescho.game.main.GameMain.main(GameMain.)

剑栈风樯各苦辛,别时冰雪到时春
2019-03-01 06:42
ssl002
Rank: 2
等 级:论坛游民
威 望:2
帖 子:75
专家分:43
注 册:2017-6-13
收藏
得分:0 
什么意思?能解释一下吗?谢谢,怎么修改呢?需要提供什么吗?谢谢!!!
2019-03-01 10:52
ssl002
Rank: 2
等 级:论坛游民
威 望:2
帖 子:75
专家分:43
注 册:2017-6-13
收藏
得分:0 
图片的问题已解决。空值异常还没解决!谢谢谢谢!!!
2019-03-01 11:40
快速回复:jar文件运行问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.077034 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved