I am trying to run a .jar file that I have created using either the command line and double clicking. The Jar makes a JFrame GUI with button, text, labels etc.. It should display this window.
I have checked and the file is associated with javaw.exe in the correct directly. I have also tried via the command like using java -jar filename.jar and it just paused for a split second and then moves to the next line, no errors.
I have also run javafix which also hasn’t helped.
I have reinstalled JRE and JKE and still no luck, the file was created in Netbeans and compiles without problem.
I am using this Netbeans tutorial: Introduction to GUI Building.
Any suggestions? I’m Stumped.
The best I can tell is to Press Win + R and type regedit.exe, Press Enter.
In your Registry Editor Window, Expand
HKEY_CURRENT_USER->Software->Microsoft->Windows->CurrentVersion->Explorer->FileExtsDelete the entry or Key Name .jar from the list. Do check the version used by your NetBeans and the one on your classpath. Hopefully they both are same versions, it can be one of the reasons too, for .jar not working. Now again try to run your .jar file. That might help it to run again.
Regards