Environment variables for java installation

后端 未结 14 1016
清歌不尽
清歌不尽 2020-11-22 00:52

How to set the environment variables for Java in Windows (the classpath)?

14条回答
  •  清酒与你
    2020-11-22 01:08

    For Windows:

    • Right click on 'My Computers' and open 'Properties'.
    • In Windows Vista or Windows 7, go to "Advanced System Settings". Else go to next step.
    • Go to 'Advanced Tab' and click on Environment Variables button.
    • Select 'Path' under the list of 'System Variables', and press Edit and add C:\Program Files\java\jdk\bin after a semicolon.
    • Now click on 'new' button under system variables and enter 'JAVA_HOME' as variable name and path to jdk home directory (ex. 'C:\Program Files\Java\jdk1.6.0_24' if you are installing java version 6. Directory name may change with diff. java versions) as variable_value.

提交回复
热议问题