I've just downloaded latest Java JDK for Mac OSX (jdk-7u17-macosx-x64.dmg) from here.
I have it installed, but I can't find where it has been installed so that I could setup JAVA_HOME.
notebook:work askar$ ls -al /System/Library/Frameworks/JavaVM.framework/Versions/Current
lrwxr-xr-x 1 root wheel 1 Jul 29 2012 /System/Library/Frameworks/JavaVM.framework/Versions/Current -> A
Today is March 11, 2013. Here it shows Jul 29, 2012...
Use the /usr/libexec/java_home
utility which returns the path to the preferred JVM version.
With /usr/libexec/java_home -V
you can retrieve a list of all installed JVMs.
The easiest way to set up $JAVA_HOME
is:
export JAVA_HOME=$(/usr/libexec/java_home)
This will always set the path to the latest JVM, so you don't have to update it after upgrading java.
echo `/usr/libexec/java_home`
You can use this command to find the java home in mac os.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With