Java Beginner Tutorial 3 – How to install or update JAVA on Mac


Today we will learn:

1. How to setup and install java on mac os
2. How to setup Java env variables
3. How to change/switch java version on your system

Step 1
Check if java is installed
Terminal :
java -version
javac -version

Step 2
Download and install java

Step 3
How to set java env variable – JAVA_HOME
setting JAVA_HOME
setting JAVA_HOME in .bash_profile

Step 4
How to switch java version
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`



Send me your comments and feedback