beta.blog

macOS: Find Java Installation Path

by on Aug.27, 2018, under MAC OS X

I recently was trying to figure out where Java is being installed on macOS. One may use the following command to find the Java Home Directory of the java currently in path.

echo $(/usr/libexec/java_home)

Per default, the Java Home directory for JDK’s on macOS is:

/Library/Java/JavaVirtualMachines/jdk.jdk/Contents/Home/

For example:

/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/

And analogous for JRE’s:

/Library/Java/JavaVirtualMachines/jdk.jre/Contents/Home/
:,

Leave a Reply

*

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!