filmov
tv
How to Install Java JDK on Mac OS and set JAVA HOME variable

Показать описание
How to Install Java JDK on Mac OS and set JAVA_HOME variable
Step 1 - Check if Java is already installed java -version
Step 3 - Install JDK with Homebrew brew install openjdk
Step 4 - Verify installation java -version
Step 5 - Set Java Home
Homebrew will usually set the JAVA_HOME environment variable correctly
However, if it's not set or you need to set it manually.
Can do so by adding the following line to your shell profile file
(.bash_profile, .zshrc, or similar):
export JAVA_HOME="/usr/local/opt/openjdk"
To apply this change, run:
source ~/.bash_profile # or ~/.zshrc if you're using Zsh
On Mac OS X 10.5 or later, we can use /usr/libexec/java_home to return the location of the default JDK.
Raghav Pal
▬▬▬▬▬▬▬
Every Like & Subscription gives me great motivation to keep working for you
You can support my mission for education by sharing this knowledge and helping as many people as you can
If my work has helped you, consider helping any animal near you, in any way you can
Never Stop Learning
Raghav Pal
▬▬▬▬ USEFUL LINKS ▬▬▬▬
▬▬ CI | CD | DEVOPS ▬▬
▬▬ UI TESTING ▬▬
▬▬ API TESTING ▬▬
▬▬ MOBILE TESTING ▬▬
▬▬ PERFORMANCE TESTING ▬▬
▬▬ SOURCE CODE MANAGEMENT ▬▬
▬▬ IDE ▬▬
▬▬ PROGRAMMING ▬▬
▬▬ BUILD TOOLS ▬▬
▬▬ CLOUD SERVICES ▬▬
▬▬ DATA FORMATS ▬▬
▬▬ OTHERS ▬▬
—
Комментарии