I need to know where JDK is located on my machine.
On running Java -version
in cmd, it shows the version as '1.6.xx'.
To find the location of this SDK on my machine I tried using echo %JAVA_HOME%
but it is only showing 'JAVA_HOME' (as there is no 'JAVA_PATH' var set in my environment variables).
Best Answer
If you are using Linux/Unix/Mac OS X:
Try this:
Should output the exact location.
After that, you can set
JAVA_HOME
environment variable yourself.In my computer (Mac OS X - Snow Leopard):
If you are using Windows: