I have this big problem with my code, here it is:
https://www.dropbox.com/s/2lc6iygbx2gwlqj/Screenshot%202014-07-19%2011.24.20.png

here is my ERROR:
Exception in thread "Thread-0" java.lang.IllegalArgumentException: input == null!
at javax.imageio.ImageIO.read(ImageIO.java:1348)
at ca.gingerninja.game.gfx.SpriteSheet.<init>(SpriteSheet.java:19)
at ca.gingerninja.game.Game.Screen(Game.java:55)
at ca.gingerninja.game.Game.run(Game.java:78)
at java.lang.Thread.run(Thread.java:745)

Can someone please help, I would really like to continue with my game!

Recommended Answers

All 4 Replies

Why don't you use libgdx for game development?

what is libgdx? Does it include writing all the java codes?

It can't read the image file. Possibly because the file is invalid, but much more likely it's looking for it in the wrong place. Java's default folders are often a source of confusion.
To see where Java is looking for a file (eg "images/image1.jpg") you can use something like this to print the complete path where Java is looking...

System.out.println(new File("images/image1.jpg").getCanonicalPath());
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.