Switching to java 11 from java 8

后端 未结 4 1850
误落风尘
误落风尘 2021-01-05 01:55

I have downloaded and installed oraclejdk11 from oracle official site and modified PATH & JAVA_HOME variable in system environment variable on windows

C:\\Users\

4条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-05 02:42

    I upgraded to JDK 11 from JDK 8. After adding Java 11 to the path [ point path up to

    bin foler ] and JAVA_HOME [ only upto jdk folder (don't include bin ) ]

    successfully,

    java -version was still pointing to the previous java version (java 8 in my case.)

    Then, I ran a command "setx -m JAVA_HOME "C:\Program Files\Java\jdk-11.0.7"

    Now java -version or javac -version both shows java 11.

    I hope it helps you too.

提交回复
热议问题