简体   繁体   中英

Upgrading java version to use latest from JDK 8

I just downloaded the latest JDK 8 from Oracle and ran the installer on Mac OS X.

However, even after restarting, I see I'm still on version 1.6

$ java -version
java version "1.6.0_65"

What do I do to get it to use version 1.8?

安装Java可选软件包或Oracle JDK后,添加以下〜/ .bash_profile文件行将相应地设置环境变量。

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM