How to Install Java on Mac OS X | 2020



How to install Java JDK (Java Development kit 12) on Mac OS. Download and install Java on Mac OS X. We will also update the JAVA_HOME environment variable needed for development.

ADDITIONAL IMPORTANT STEP!!!
**************
After saving the Bash profile file, please open terminal and type “source ~/.bash_profile” without the quotes. After that echo $JAVA_HOME and it should work.
**************

Enter the following in the .bash_profile file to update the JAVA_HOME environment variable :
export JAVA_HOME=$(/usr/libexec/java_home)

Link to download JDK:

How to install JDK on windows: https://docs.oracle.com/javase/9/install/installation-jdk-and-jre-microsoft-windows-platforms.htm#JSJIG-GUID-A7E27B90-A28D-4237-9383-A58B416071CA .

Share this: