How to set or change the default Java (JDK) version on OS X?

后端 未结 28 2644
渐次进展
渐次进展 2020-11-22 15:55

How can you change the default version of Java on a mac?

28条回答
  •  暖寄归人
    2020-11-22 16:08

    If still u are not able to set it. using this command.

    export JAVA_HOME=/usr/libexec/java_home -v 1.8

    then you have to use this one.

    export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)

    it will surely work.

提交回复
热议问题