I created an application using netbeans, and it works very good when I run it from netbeans, but when I try to run it from a command line or from the excutable .jar file, then it doesn't work! And this errors appears to me:
Dec 12, 2011 11:36:33 PM game.Threads.Intro_main <init>
SEVERE: null
javax.imageio.IIOException: Can't read input file!
at javax.imageio.ImageIO.read(Unknown Source)
at game.Threads.Intro_main.<init>(Intro_main.java:58)
at game.Intro.<init>(Intro.java:28)
at game.Start.<init>(Start.java:25)
at game.Start.main(Start.java:35)
Exception in thread "main" java.lang.NullPointerException
at sun.awt.CustomCursor.<init>(Unknown Source)
at sun.awt.windows.WCustomCursor.<init>(Unknown Source)
at sun.awt.windows.WToolkit.createCustomCursor(Unknown Source)
at game.Threads.Intro_main.<init>(Intro_main.java:69)
at game.Intro.<init>(Intro.java:28)
at game.Start.<init>(Start.java:25)
at game.Start.main(Start.java:35)
I think that the problem is the command line & the .jar doesn't determine the true path for images which I load in the application, so I don't know the right way to avoid this problem.
I know that there are many questions here about this problem, but I didn't know the true solution, I tried many answers and they didn't work!
Thank you for your cooperation :)