mac 配置jdk 环境变量(No Java runtime present, requesting install.)

No Java runtime present, requesting install.

安装完还提示这个错误,可以

vim .bash_profile 

添加:  

export JAVA_HOME="/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home"

 

export PATH=${JAVA_HOME}/bin:$PATH

保存,并关闭

然后  source .bash_profile


java -version

打印:


java version "1.8.0_66"

Java(TM) SE Runtime Environment (build 1.8.0_66-b17)

Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)

你可能感兴趣的:(shell)