On my Mac, the Java version specified in the command terminal is 1.7.0_40. Java Control Panel (System Preferences) indicates 1.7.0_51.
Why are they different?
Additional Information:
From the command terminal /usr/libexec/java_home -V replies:
Matching Java Virtual Machines (3): 1.7.0_40, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home 1.6.0_65-b14-462, x86_64: "Java SE 6" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home 1.6.0_65-b14-462, i386: "Java SE 6" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
JAVA_HOME set to:
/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home
From the command terminal, java -version responds:
java version "1.7.0_40" Java(TM) SE Runtime Environment (build 1.7.0_40-b43) Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)
java version macos
ksl
source share