[macos] What is path of JDK on Mac ?

Im using Mac only at work and I need to set JAVA_HOME to proper path of JDK. I downloaded JDK, installed it and now I can't find it anywhere. I was looking at the internet for the solution, but there is no folder Libraries/Java.

This question is related to macos java

The answer is


/System/Library/Frameworks/JavaVM.framework/

Also see Java 7 path on mountain lion


On my Mac:

/System/Library/Frameworks/JavaVM.framework/Home/

btw, did you tried which java?


Have a look and see if the the JDK is at:

Library/Java/JavaVirtualMachines/ Or /System/Library/Java/JavaVirtualMachines/

Check this earlier SO post: JDK on OSX 10.7 Lion


Which Mac version are you using? try these paths

 /System/Library/Frameworks/JavaVM.framework/ OR
 /usr/libexec/java_home

This link might help - How To Set $JAVA_HOME Environment Variable On Mac OS X