Pls help me i got this message when i compile my program
Printable View
Pls help me i got this message when i compile my program
That is a very unusual error message to get when compiling a program.Quote:
got this message when i compile my program
Normally you only get that error when executing a program.
Please copy the full text of the error message and paste it here.
Hi , at compile time it can not rise. whenever performing the any operations on null values it may be rise at run time.
Yes, you are right, the error occurs during run time. The output shows
"Exception in thread "main" java.lang.NullPointerException
at javax.swing.ImageIcon.<init>(ImageIcon.java:205)
at Login.<init>(Login.java:38)
at Login.main(Login.java:100)
Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)"
There is a variable with a null value at line 38 where the code is trying to create an ImageIcon.Quote:
"Exception in thread "main" java.lang.NullPointerException
at javax.swing.ImageIcon.<init>(ImageIcon.java:205)
at Login.<init>(Login.java:38)
Check the code and make sure the variable does not have a null value there.