JAVA环境变量配置

Set the JAVA_HOME Variable

To set the JAVA_HOME variable:

  1. Find out where Java is installed. If you didn't change the path during installation, it will be something like this:
    C:Program FilesJavajdk1.8.0_65
  2. In Windows 7 right click My Computer and select Properties > Advanced.
    In Windows 8 go to Control Panel > System > Advanced System Settings.
  3. Click the Environment Variables button.
  4. Under System Variables, click New.
  5. In the Variable Name field, enter:
    • JAVA_HOME if you installed the JDK (Java Development Kit)
      or
    • JRE_HOME if you installed the JRE (Java Runtime Environment) 
  6. In the Variable Value field, enter your JDK or JRE installation path.

    If the path contains spaces, use the shortened path name, for example C:Progra~1Javajdk1.8.0_65

原文地址:https://www.cnblogs.com/zhaogaojian/p/5611376.html