zoukankan      html  css  js  c++  java
  • MAC OS X10下 JAVA的环境变量设置

    参看: http://www.baeldung.com/java-home-on-windows-7-8-10-mac-os-x-linux

    From OS X 10.5, Apple introduced a command line tool (/usr/libexec/java_home) which dynamically finds the top Java version specified in Java Preferences for the current user.

    Open ~/.bash_profile in any text editor and add:

    1
    export JAVA_HOME=$(/usr/libexec/java_home)

    Save and close the file.

    Open a Terminal and run the source command to apply the changes:

    1
    source ~/.bash_profile

    Now we can check the value of the JAVA_HOME variable:

    1
    echo $JAVA_HOME

    The result should be the path to the JDK installation:

    1
    /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home
  • 相关阅读:
    bzoj1711
    bzoj1458
    bzoj1433
    hdu2732
    bzoj1066
    hdu3549
    poj1698
    [ZJOI2007]时态同步
    SA 学习笔记
    [LUOGU]2016 Sam数
  • 原文地址:https://www.cnblogs.com/carol-wei/p/7836699.html
Copyright © 2011-2022 走看看