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

Notes:

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
http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html

Step 3
How to set java env variable – JAVA_HOME
echo $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`


 

JAVA PLAYLIST – https://www.youtube.com/playlist?list=PLhW3qG5bs-L_qj1L5hnHvJYeFpQ_g4UuU

Send me your comments and feedback


 

0