Pls help me i got this message when i compile my program
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
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.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.
If you don't understand my answer, don't ignore it, ask a question.
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."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.
If you don't understand my answer, don't ignore it, ask a question.