PDA

View Full Version : Java JDK confusion




sinser
Mar 3, 2012, 07:26 AM
I was just looking at the JDK on my Mac with Mac OS X 10.7.3 and it looks like I have different versions of the JDK around.
That's what I have

/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk
/Library/Java/JavaVirtualMachines/1.6.0_31-b04-411.jdk
/System/Library/java/JavaVirtualMachines/1.6.0.jdk.

Why do I find JDK under two different JavaVirtualMachines folders ? And why are there 2 different JDK under /Library/Java/JavaVirtualMachines ? I'm really confused. How can I check to which version I'm pointing ? Should I remove, and if yes what and how, redundant JDKs ?



dampfdruck
Mar 3, 2012, 08:45 AM
"java -version" will give you the info you are looking for:

java -version
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-11D50)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)