| 网站首页 | 业界新闻 | 群组 | 交易 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
共有 440 人关注过本帖
标题:jar文件运行问题
只看楼主 加入收藏
ssl002
Rank: 1
等 级:新手上路
帖 子:51
专家分:0
注 册: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运行后的结果,有大佬帮忙看下出了什么问题吗?谢谢谢谢!!!!!!!
2019-02-28 19:30
ssl002
Rank: 1
等 级:新手上路
帖 子:51
专家分:0
注 册:2017-6-13
  得分:0 
在线等!
2019-02-28 19:34
林月儿
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:湖南
等 级:版主
威 望:123
帖 子:1870
专家分:8197
注 册:2015-3-19
  得分:0 
估计是空值异常吧,你是要改源码还是咋地

知命以下无敌
2019-02-28 20:38
幻紫灵心
Rank: 16Rank: 16Rank: 16Rank: 16
来 自:山咔咔里面
等 级:版主
威 望:41
帖 子:362
专家分:2381
注 册:2018-3-30
  得分:0 
Error while reading:welcome.png
读不到图呗...

saber,别哭.
2019-02-28 21:23
ssl002
Rank: 1
等 级:新手上路
帖 子:51
专家分:0
注 册:2017-6-13
  得分:0 
啊!原代码太长了QAQ
2019-02-28 21:36
ssl002
Rank: 1
等 级:新手上路
帖 子:51
专家分:0
注 册:2017-6-13
  得分:0 
空值异常是个什么鬼啊?!
2019-02-28 21:43
ssl002
Rank: 1
等 级:新手上路
帖 子:51
专家分:0
注 册:2017-6-13
  得分:0 
赶脚时图片问题啊,不像是什么空值异常!
2019-02-28 21:50
林月儿
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:湖南
等 级:版主
威 望:123
帖 子:1870
专家分:8197
注 册: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: 1
等 级:新手上路
帖 子:51
专家分:0
注 册:2017-6-13
  得分:0 
什么意思?能解释一下吗?谢谢,怎么修改呢?需要提供什么吗?谢谢!!!
2019-03-01 10:52
ssl002
Rank: 1
等 级:新手上路
帖 子:51
专家分:0
注 册:2017-6-13
  得分:0 
图片的问题已解决。空值异常还没解决!谢谢谢谢!!!
2019-03-01 11:40







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

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