1.进入用户目录 cd ~ 2.创建.bash_profile文件 touch .bash_profile 3.编辑 vi .bash_profile 输入 export PATH export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin #setting JAVA_HOME JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home export JAVA_HOME # setting ...