mac 安装jdk环境

jdk 1.8 安装

cd ~

打开编辑.bash_profile

open .bash_profile

如果出现The file /xxxx/.bash_profile does not exist的情况,需要创建.bash_profile文件

touch .bash_profile

然后再open .bash_profile,在弹出的操作框中输入

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_25f1.jdk/Contents/Home

并保存
这时在终端输入

java -version

就能看到安装成功了

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。