0

I'm making a GUI program with JAVA And I want to show image while program is running

It runs well on eclips then I want to convert exe file, so I export the projects as runnable jar and us jsmooth but it doesn't work as an exe file

introBackground = new 
ImageIcon(Main.class.getResource("../images/intro.jpg")).getImage();

If I convert as console program, It says,

Exception in thread "main" java.lang.NullPointerException
at javax.swing.ImageIcon.<init>(Unknown Source)
at test.Intro.<init>(Intro.java:31)
at test.Main.main(Main.java:11)

0 Answers0