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

getting error while trying to run "FlappyBird.jar" file. #13

Open
prateekgoelmzn opened this issue Jan 9, 2022 · 4 comments
Open

getting error while trying to run "FlappyBird.jar" file. #13

prateekgoelmzn opened this issue Jan 9, 2022 · 4 comments

Comments

@prateekgoelmzn
Copy link

Getting below error:
`
java.io.FileNotFoundException: resources/img/background.png (No such file or directory)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:212)
at java.base/java.io.FileInputStream.(FileInputStream.java:154)
at java.base/java.io.FileInputStream.(FileInputStream.java:109)
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
at com.kingyu.flappybird.component.GameBackground.(GameBackground.java:27)
... 3 more

`

@prateekgoelmzn prateekgoelmzn changed the title getting error why trying to run "FlappyBird.jar" file. getting error while trying to run "FlappyBird.jar" file. Jan 9, 2022
@PDPENG
Copy link

PDPENG commented Mar 6, 2022

Try switching to or installing JDK1.8 to troubleshoot environment issues

@heiyt
Copy link

heiyt commented Apr 13, 2022

Does this call Swing bag?

@PDPENG
Copy link

PDPENG commented Apr 13, 2022

Does this call Swing bag?

What does you mean?

@heiyt
Copy link

heiyt commented Apr 14, 2022

这个是用swing做的吗

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

3 participants