Double-click the jar file on win10 cannot start the GUI

First , Set environment variables

  • CLASSPATH :.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;
  • JAVA_HOME : C:\Program Files\java\jdk1.8.0_181
  • PATH :%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin\

Second , Edit the registry

  1. Use ctrl+f to find .jar_auto_file item
  2. Find the command in its sub-items and edit the key value on the right
  3. Add parameter -jar
    Double-click the jar file on win10 cannot start the GUI
    Now you can double-click to open the jar executable file.

Enjoy it !