Java_home environment variables are important for Java development, and are no exception for Mac.
JDK is provided for Mac, JDK is maintained by Apple, and the default JDK path, that is, the java_home path is:
/System/library/frameworks/JavaVM. Framework/versions/currentjdk/home
Java version "1.6.0 _ 22 ″
Java (TM) se Runtime Environment (build 1.6.0 _ 22-b04-307-10m3261)
Java hotspot (TM) 64-bit server VM (build 17.1-b03-307, mixed mode)
Openjdk7 has a Mac version. After installation, the path is:
/Library/Java/javavirtualmachines/1.7.0.jdk/contents/home
Openjdk version "1.7.0-internal"
Openjdk Runtime Environment (build 1.7.0-internal-b00)
Openjdk 64-bit server VM (build between 0-b06, mixed mode)
Openjdk6 can also be run on Mac, but cannot be run directly. macport is required.
After the installation is complete, the openjdk6 path is:
/Opt/local/share/Java/openjdk6
Openjdk version "1.6.0 ″
Openjdk Runtime Environment (build 1.6.0-B20)
Openjdk 64-bit server VM (build 17.0-f8, mixed mode)