Install Java and set up Java Home Path in macOS from scratch | In Hindi



NOTE: bash_profile spelling is not right in the video. By mistake I wrote bash_prifile, please pay attention to this.

How to Install and Setup Java in MacOS

Step 1. Download Java from

Step 2. Find Java Home Path
– /usr/libexec/java_home -v18

Step 3. Set Java Home Path in Bash Profile
– vim .bash_profile
– export JAVA_HOME={PATH from Step 2}
– source ~/.bash_profile

Step 4. Check Everything
– echo $JAVA_HOME
– java -version
– javac -version

Share this: