After upgrading to Java8, javac still shows 1.7

前端 未结 6 2138
一生所求
一生所求 2020-12-13 06:43

I\'m having issues upgrading from JDK 1.7 -> 1.8 on OSX. The upgrade has completed, but javac still returns 1.7 as the version.

I\'ve downloaded JDK 8_u5 from Oracl

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-13 07:24

    For Windows users:

    It is possible, that you have to change your PATH variable. Try to set your "%JAVA_HOME%/bin" as the first entry in the PATH.

    So now it looks like this:

     PATH    C:\Program Files\anyprogram;C:\Program Files\...;%JAVA_HOME%\bin
    

    And you change it like this:

     PATH    %JAVA_HOME%\bin;C:\Program Files\anyprogram;C:\Program Files\...
    

    Reason: Any other Program initiates an other Java Version first.

提交回复
热议问题