Find JAVA_HOME JDK Location on macOS
more_vert
This article provides the steps to locate Java JDK location on macOS. The system version is 11.1 (macOS Big Sur).
Find JDK
- Open Terminal.
- Change directory to /Library/Java/JavaVirtualMachines.
cd /Library/Java/JavaVirtualMachines
- List JDKs:
ls
- In my system, there are two SDKs (JDK8 and JDK11):
bash-3.2$ ls
jdk-11.0.9.jdk jdk1.8.0_201.jdk
Setup JAVA_HOME variable
JAVA_HOME variable is required by a number of Java dependent applications. Use the following command line to setup the variable:
export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk-11.0.9.jdk/Contents/Home"
info Last modified by Administrator 3 years ago
copyright
This page is subject to Site terms.
Log in with external accounts
warning Please login first to view stats information.
article
MySQL: The server time zone value 'AEDT' is unrecognized or represents more than one time zone
article
Install Open JDK on WSL
article
JDBC Integrated Security, NTLM and Kerberos Authentication for SQL Server
article
Install Maven on WSL
article
java.net.SocketException: Permission denied
Read more (16)