2.1. Install Java JDK

  1. Cài đặt Java JDK 11 trở lên

2. Thiết lập biến môi trường JAVA_HOME

  • Cho Linux

  • Cho MAC OS

    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:

    Save and close the file.

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

    $ source ~/.bash_profile

    Now we can check the value of the JAVA_HOME variable:

    $ echo $JAVA_HOME

    The result should be the path to the JDK installation:
  
    $ /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home

Last updated

Was this helpful?