1. In the official website to download and install JAVA
2. modify environment variables:
- Right My Computer -> Properties -> Advanced System Settings -> Environment Variables -> System Variables found
- New variable name "JAVA_HOME", is "C: \ Program Files \ Java \ jdk version number", here you need to find your installation directory, I wrote my own
- After modifying the path, the system variables in the path, double-click, and then create, "% JAVA_HOME% \ bin"
3. Test:
Open cmd console or powershell;
Enter java -version, java, javac test, can function properly, ok successful configuration.
Open the jar file path to a relative path to the console input, java -jar path