JAVA_HOME environment variable and Java JDK fun

前端 未结 4 1345
忘了有多久
忘了有多久 2021-02-13 17:38

I wanted to get Java running at 1.6xxx - I changed the JAVA_HOME variable and pointed it to the directory C:\\Program Files\\Java\\jdk1.6.0._16.

I restart the PC - and I

相关标签:
4条回答
  • 2021-02-13 17:56

    You need to reset your path variable to point to 1.6

    something like
    alt text

    Additionally, make sure the variable JAVA_HOME is also set with the above location.

    0 讨论(0)
  • 2021-02-13 18:03

    This Image will explain all steps.

    For More Explanation

    0 讨论(0)
  • 2021-02-13 18:09

    JAVA_HOME is used by other applications, such as Tomcat. Windows just checks the PATH environment variable for locations where it can find the java executable.

    0 讨论(0)
  • 2021-02-13 18:10

    Try this on the cmd shell:

    > java -version
    java version "1.5.0_16"
    > set PATH=%JAVA_HOME%\bin;%PATH%
    > java -version
    
    0 讨论(0)
提交回复
热议问题