After upgrading to Java8, javac still shows 1.7

前端 未结 6 2141
一生所求
一生所求 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:36

    This is (most likely) a bug in the installation process of jre8.

    I am getting the exact same behaviour when navigating to my jre8 folder, which is the one which Windows (in my case) shows by default:

    • java version: 1.8.0, runtime environment 1.8.0-b132, hotspot 64-bit JVM 25.0-b70
    • javac version: 1.7.0_25

    When navigating to the jdk8 directory, it shows the following:

    • java version: 1.8.0, runtime environment 1.8.0-b132, hotspot 64-bit JVM 25.0-b70
    • javac version: 1.8.0

    I did just now notice though that the jre does never ship an javac, so this is an issue in the reference settings in the operating system then I guess.

    To fix it, you would need to manually fix the javac reference in your OS.

提交回复
热议问题