Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (549)
Games in Android Showcase (135)
games submitted by our members
Games in WIP (593)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  IllegalArgumentException ?  (Read 559 times)
0 Members and 1 Guest are viewing this topic.
Offline Gamerulf

Junior Devvie

Medals: 2

« Posted 2013-04-15 17:51:21 »

Exception in thread "main" java.lang.IllegalArgumentException: input == null!
   at Source)
   at sAdv.Board.loadImages(
   at sAdv.Board.<init>(
   at sAdv.GameLoop.<init>(
   at sAdv.GameLoop.main(

This is error is new to me.

This is how I load my images.
background ="res/bg.png"));

- Gamerulf
Offline Gamerulf

Junior Devvie

Medals: 2

« Reply #1 - Posted 2013-04-15 18:07:15 »

I would really appreciate an answer since I have to send it to my teacher in 3 hours :/

- Gamerulf
Offline Axeman

Senior Devvie

Medals: 7

« Reply #2 - Posted 2013-04-15 18:30:39 »

Have you checked, double checked and checked again your path so it´s correct? Smiley If you´re using Eclipse, have you "refreshed"? Sometimes refresh doesn´t work for me so at times I´ve had to open up the .png file (in the project folder in Eclipse) in a text editor, type a character and remove it so I can save the file again. That can help...
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Gamerulf

Junior Devvie

Medals: 2

« Reply #3 - Posted 2013-04-15 18:50:27 »

I will try the "add and remove character" ^^

EDIT: Couldnt do it, some character ecoding problems..
Checked the build path and it's fine.

- Gamerulf
Offline Regenuluz
« Reply #4 - Posted 2013-04-15 19:07:42 »

Well, considering that it's telling you that the input to is null, then this.getClass().getResource("res/bg.png") must be the problem. Smiley
Offline Stranger

Senior Devvie

Medals: 9

I'm going slightly mad. It finally happened.

« Reply #5 - Posted 2013-04-15 19:14:35 »

look at these:

Offline Gamerulf

Junior Devvie

Medals: 2

« Reply #6 - Posted 2013-04-15 19:26:20 »

Thank you very much!
Moving my images from the res folder and directly into the src folder worked Smiley

- Gamerulf
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.


Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Olo (3 views)
2015-01-25 09:44:22

Robo11 (18 views)
2015-01-24 21:14:26

basil_ (26 views)
2015-01-17 13:29:32

wxwsk8er (24 views)
2015-01-16 12:42:21

wxwsk8er (20 views)
2015-01-16 11:44:20

basil_ (25 views)
2015-01-14 00:46:59

basil_ (21 views)
2015-01-14 00:46:52

wxwsk8er (32 views)
2015-01-13 11:42:16

wxwsk8er (34 views)
2015-01-12 18:23:59

vctt (55 views)
2015-01-11 18:21:07
2D Dynamic Lighting
by ThePixelPony
2015-01-01 11:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 10:41:21

Resources for WIP games
by kpars
2014-12-18 01:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 13:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 13:36:02

List of Learning Resources
by Longor1996
2014-08-16 01:40:00

List of Learning Resources
by SilverTiger
2014-08-05 10:33:27

Resources for WIP games
by CogWheelz
2014-08-01 07:20:17 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!