Win10 build JAVA environment

1. In the official website to download and install JAVA

2. modify environment variables:

  1. Right My Computer -> Properties -> Advanced System Settings -> Environment Variables -> System Variables found
  2. 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
  3. 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

Guess you like

Origin www.cnblogs.com/wayne-tao/p/11026189.html