Java JDK confusion

Discussion in 'Mac Programming' started by sinser, Mar 3, 2012.

  1. macrumors 6502a

    sinser

    Joined:
    Sep 16, 2003
    #1
    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

    Code:
    /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 ?
     
  2. macrumors member

    Joined:
    Oct 20, 2008
    #2
    "java -version" will give you the info you are looking for:

    Code:
    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)
     

Share This Page