Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resources\img\background.png (系统找不到指定的路径。) #20

Open
sanbang09 opened this issue Sep 5, 2024 · 1 comment
Open

Comments

@sanbang09
Copy link

resources\img\background.png (系统找不到指定的路径。)

@sanbang09
Copy link
Author

"C:\Program Files\Java\jdk-17\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2023.2.5\lib\idea_rt.jar=57573:C:\Program Files\JetBrains\IntelliJ IDEA 2023.2.5\bin" -Dfile.encoding=UTF-8 -classpath C:\Users\Hya\Downloads\jfugue-5.0.9.jar;C:\Users\Hya\Downloads\FlappyBird-master\out\production\FlappyBird-master com.kingyu.flappybird.app.App
java.io.FileNotFoundException: resources\img\background.png (系统找不到指定的路径。)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
at java.base/java.io.FileInputStream.(FileInputStream.java:157)
at java.base/java.io.FileInputStream.(FileInputStream.java:111)
at com.kingyu.flappybird.util.GameUtil.loadBufferedImage(GameUtil.java:30)
at com.kingyu.flappybird.component.GameBackground.(GameBackground.java:25)
at com.kingyu.flappybird.app.Game.initGame(Game.java:116)
at com.kingyu.flappybird.app.Game.(Game.java:46)
at com.kingyu.flappybird.app.App.main(App.java:12)
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.kingyu.flappybird.app.Game.initGame(Game.java:116)
at com.kingyu.flappybird.app.Game.(Game.java:46)
at com.kingyu.flappybird.app.App.main(App.java:12)
Caused by: java.lang.NullPointerException: Cannot invoke "java.awt.image.BufferedImage.getHeight()" because "com.kingyu.flappybird.component.GameBackground.BackgroundImg" is null
at com.kingyu.flappybird.component.GameBackground.(GameBackground.java:27)
... 3 more

进程已结束,退出代码为 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant