Install JDK11(MACOS)
奕伟 蒋
Posted on June 17, 2024
1.download installation package
(macOS version end with .pkg)
download link
2.install jdk11
- open the '.pkg' file
- 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
- 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
- save and exit the file, use the following command to make the configuration effective
source ~/.zshrc
or
source ~/.bash_profile
4.verify
- check 'JAVA_HOME' variable
echo $JAVA_HOME
- check java version
java -version
- check javac version
javac -version
💖 💪 🙅 🚩
奕伟 蒋
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
programming Title: "The Art of Graph Coloring: Solving Real-World Problems with Efficient Solutions"
November 23, 2024