As I was trying to create an applet for school Java suddenly crashed. The error message “Cannot launch java application Uncaught exception in main method:Java.lang.NullPointerException” was produced.
Should I reinstall Java or is there a quick fix for this issue?
Cannot launch Java application
Uncaught exception in main method:
Java.lang.NullPointerException
Cannot launch Java application Uncaught exception in main method
The problem may be caused by an unsupported version of Java Runtime.
You can follow the steps below:-
Click Start > Control Panel.
Then double-click Java.
On the General tab, under Temporary Internet Files, click Settings.
Click Delete Files.
Make sure all boxes are checked and
Click OK to close the dialog boxes.
OR,
You can reinstall Java or can update it to solve your problem.