Install JDK11(MACOS)

__1c1b7f036f4faee450ed

奕伟 蒋

Posted on June 17, 2024

Install JDK11(MACOS)

1.download installation package

(macOS version end with .pkg)
download link

2.install jdk11

  1. open the '.pkg' file
  2. follow the installation prompts to install

3.configuring environment vaiables

  • open the terminal, run the fllowing command to confirm the installation path
/usr/libexec/java_home -v 11
Enter fullscreen mode Exit fullscreen mode
  • edit '~/.zshrc' or '~/.bash_profile' file,add the following content
export JAVA_HOME=$(/usr/libexec/java_home -v 11)
export PATH=$JAVA_HOME/bin:$PATH
Enter fullscreen mode Exit fullscreen mode
  • save and exit the file, use the following command to make the configuration effective
source ~/.zshrc
or
source ~/.bash_profile
Enter fullscreen mode Exit fullscreen mode

4.verify

  • check 'JAVA_HOME' variable
echo $JAVA_HOME
Enter fullscreen mode Exit fullscreen mode
  • check java version
java -version
Enter fullscreen mode Exit fullscreen mode
  • check javac version
javac -version
Enter fullscreen mode Exit fullscreen mode

Image description

💖 💪 🙅 🚩
__1c1b7f036f4faee450ed
奕伟 蒋

Posted on June 17, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

While Loops
javascript While Loops

November 26, 2024

Exploratory Testing: A Detailed Guide
javascript Exploratory Testing: A Detailed Guide

November 25, 2024

Bookmarker
webdev Bookmarker

November 24, 2024