Determining the version of Java SDK on the Mac

后端 未结 6 545
面向向阳花
面向向阳花 2021-01-31 01:21

I have a MacBook Pro running Snow Leopard; how can I see what version of the Java SDK is installed on my Mac?

6条回答
  •  情话喂你
    2021-01-31 02:04

    The simplest solution would be open terminal

    $ java -version
    

    it shows the following

    java version "1.6.0_65"
    
    1. Stefan's solution also works for me. Here's the exact input:

    $ cd /System/Library/Frameworks/JavaVM.framework/Versions

    $ ls -l

    Below is the last line of output:

    lrwxr-xr-x   1 root  wheel   59 Feb 12 14:57 CurrentJDK -> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents
    

    1.6.0.jdk would be the answer

提交回复
热议问题