macOS Java安装与配置

运行环境:html

  • macOS Hight Sierra(Version 10.13.6)
  • Terminal(oh my zsh)
  1. 下载安装JREjava

    Download URLvim

  2. 下载安装JDKbash

    Download URLoracle

  3. 配置JAVA_HOME
    • 打开Terminal
    • vim .bash_profile
    • export JAVA_HOME=$(/usr/libexec/java_home)
    • source .bash_profile
    • echo $JAVA_HOME
  4. 添加$JAVA_HOME/bin.bash_profile
    • 打开Terminal
    • vim .bash_profile
    • export PATH=${JAVA_HOME}/bin:$PATH
    • source .bash_profile
  5. 完成!jsp

相关文章
相关标签/搜索