Mac 开发环境
1、JDK安装路径:
查看JDK路径的命令:/usr/libexec/java_home -V默认JDK1.6(Apple自带JDK)路径: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home默认JDK1.7、1.8(Oracle) Home : /Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home
2、环境变量配置
创建配置文件:$ touch .bash_profile打开配置文件:$ open -e .bash_profile配置文件插入内容:JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/HomePATH=$JAVA_HOME/bin:$PATH:.CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:.export JAVA_HOMEexport PATHexport CLASSPATH配置文件生效:$ source .bash_profile查看配置是否生效:$ echo $JAVA_HOME查看JDK版本信息:$ java -version参考资料:https://www.jianshu.com/p/bd912e2d40f3
相关推荐
MAC2007 2020-06-16
lonesomer 2020-09-17
Locksk 2020-10-12
佛系程序员J 2020-10-10
gdb 2020-09-14
zousongshan 2020-08-10
hell0kitty 2020-07-28
malonely 2020-07-20
missingmuch 2020-07-19
eternityzzy 2020-07-19
wangrui0 2020-06-28
一世为白 2020-06-21
凉白开 2020-06-17
zhangwentaohh 2020-06-14
liangston 2020-06-14
linzb 2020-06-14
89421478 2020-06-12