in

How to Install Java JDK on Mac OS X [2022]



Quick Tutorial on How to install Java JDK Java Development Kit (JDK) on Mac.

You can follow these steps to install any java version on your Mac OS X.

Note:This works on Mac OS running on M1 Chip and the Intel processors.

Java JDK Download:

After the JAVA installation has completed, find the java version:
java -version

Find the location where Java JDK is Installed:
/usr/libexec/java_home

Now, find the shell you are on:
echo $SHELL

Find out the current directory you are in ZSH:
pwd

Navigate to the HOME directory:
cd /Users/[your_username]

List all the files in your current directory:
ls -al

configure JAVA_HOME path in zsh shell in MACOS:
touch ~/.zshenv
open ~/.zshenv
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-17.0.1.jdk/Contents/Home
cat ~/.zshenv

configure JAVA_HOME path in bash shell in MACOS
touch ~/.bash_profile
open ~/.bash_profile
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-17.0.1.jdk/Contents/Home
cat ~/.bash_profile

Videoorchard Official Fan pages:
Instagram: https://www.instagram.com/videoorchard
Facebook : http://www.facebook.com/Videoorchard
Twitter : http://twitter.com/Videoorchard

Music:
“Bisiesto” by Hiracutch is under a Creative Commons Attribution 3.0
Music promoted by BreakingCopyright: https://youtu.be/2654dx3jcTk
Note: Videoorchard is the original author of this video, we just embed it, if you have any questions please contact him via Youtube.

Share this: