mac安装和卸载jdk

作者: 极客与宽客 | 来源:发表于2019-04-30 14:19 被阅读0次

    mac卸载jdk

    列出JDK

    ls /Library/Java/JavaVirtualMachines/

    移除JDK

    sudo rm -rf /Library/Java/JavaVirtualMachines/1.6.0.jdk

    配置Java环境变量

    vim .bash_profile

    export JAVA_8_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home 

    export JAVA_HOME=$JAVA_8_HOME

    export PATH=$JAVA_HOME/bin:$PATH:. 

    export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar 

    export JMETER_HOME=/Users/ashleyyin/Downloads/apache-jmeter-5.1.1 

    export PATH=$JAVA_HOME/bin:$PATH:.:$JMETER_HOME/bin:$PATH 

    export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JMETER_HOME/lib/ext/ApacheJMeter_core.jar:$JMETER_HOME/lib/jorphan.jar:$JMETER_HOME/lib/logkit-2.0.jar

    Mac查找JDK路径

    1、打开控制台,输入以下命令

    $ /usr/libexec/java_home -v

    相关文章

      网友评论

        本文标题:mac安装和卸载jdk

        本文链接:https://www.haomeiwen.com/subject/vpvqnqtx.html