In this tutorial, we will learn to set up the JAVA_HOME environment variable in Mac OS X. I have working with os x Catalina. If you guys have a previous version of Mac OS X, you can apply the same process to set java_home.
Find the JDK package in the following path:
/Library/Java/JavaVirtualMachines/
Step 1: Now we need to set the JAVA_HOME environment variable. (for first time users: first-time installation)
Terminal command to open bash_profile file in edit mode:
open ~/.bash_profile
Add the following entries in the bash_profile file.
export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
(Important: don’t leave space after = sign )
If you found this video tutorial useful and would like to support me, you can do so by buying me a coffee using the below link!
https://buymeacoffee.com/CoolITHelp