简体   繁体   中英

What is my real Java version on macOS?

I use macOS Sierra. When I do:

java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-468-11M4833)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-468, mixed mode)

it seems that my java version is 1.6.0 . But when I look at System Preferences I find that my version is Java 8 Update 144 . I want to use an R package that needs Java >=8.0. What have I done wrong?

在命令行中找到的Java是使用命令行时用于编译的Java,首先,尝试export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)然后使用java -version检查是否显示了正确的版本。重新安装最新的Java并再次运行命令

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