JDK Directories on Mac Computer

Q

What are JDK Directories on my Mac Computer?

✍: FYIcenter

A

Here is where JDK program files are located on your Mac computer:

fyicenter$ ls -l /Library/Java/JavaVirtualMachines/
drwxr-xr-x@ 5 root  wheel  170 Feb 13  2020 jdk-13.jdk
drwxr-xr-x@ 3 root  wheel  102 Mar  5  2020 jdk-14.0.1.jdk
drwxr-xr-x  3 root  wheel  102 Oct 12  2020 jdk-15.jdk
drwxr-xr-x  3 root  wheel  102 Nov  5 23:22 jdk-17.0.5.jdk

fyicenter$ ls -l /Library/Java/JavaVirtualMachines/jdk-17.0.5.jdk/Contents/Home/bin
-rwxr-xr-x  1 root  wheel  53312 Sep 13 12:46 jar
-rwxr-xr-x  1 root  wheel  53328 Sep 13 12:46 jarsigner
-rwxr-xr-x  1 root  wheel  53424 Sep 13 12:46 java
-rwxr-xr-x  1 root  wheel  53312 Sep 13 12:46 javac
-rwxr-xr-x  1 root  wheel  53312 Sep 13 12:46 javadoc
-rwxr-xr-x  1 root  wheel  53312 Sep 13 12:46 javap
-rwxr-xr-x  1 root  wheel  53312 Sep 13 12:46 jcmd
-rwxr-xr-x  1 root  wheel  53312 Sep 13 12:46 jconsole
-rwxr-xr-x  1 root  wheel  53312 Sep 13 12:46 jdb
-rwxr-xr-x  1 root  wheel  53328 Sep 13 12:46 jdeprscan
-rwxr-xr-x  1 root  wheel  53312 Sep 13 12:46 jdeps
-rwxr-xr-x  1 root  wheel  53312 Sep 13 12:46 jfr
-rwxr-xr-x  1 root  wheel  53312 Sep 13 12:46 jhsdb
-rwxr-xr-x  1 root  wheel  53312 Sep 13 12:46 jimage
-rwxr-xr-x  1 root  wheel  53312 Sep 13 12:46 jinfo
-rwxr-xr-x  1 root  wheel  53312 Sep 13 12:46 jlink
-rwxr-xr-x  1 root  wheel  53312 Sep 13 12:46 jmap
-rwxr-xr-x  1 root  wheel  53312 Sep 13 12:46 jmod
-rwxr-xr-x  1 root  wheel  53312 Sep 13 12:46 jpackage
-rwxr-xr-x  1 root  wheel  53312 Sep 13 12:46 jps
-rwxr-xr-x  1 root  wheel  53328 Sep 13 12:46 jrunscript
-rwxr-xr-x  1 root  wheel  53312 Sep 13 12:46 jshell
-rwxr-xr-x  1 root  wheel  53312 Sep 13 12:46 jstack
-rwxr-xr-x  1 root  wheel  53312 Sep 13 12:46 jstat
-rwxr-xr-x  1 root  wheel  53312 Sep 13 12:46 jstatd
-rwxr-xr-x  1 root  wheel  53312 Sep 13 12:46 keytool
-rwxr-xr-x  1 root  wheel  53328 Sep 13 12:46 rmiregistry
-rwxr-xr-x  1 root  wheel  53328 Sep 13 12:46 serialver

If you want to run a JDK program of an older version, you need to specify the full path of the program. For example:

fyicenter$ javac -version
javac 17.0.5

fyicenter$ /Library/Java/JavaVirtualMachines/jdk-17.0.5.jdk/Contents/Home/bin/javac -version
javac 17.0.5

fyicenter$ /Library/Java/JavaVirtualMachines/jdk-13.jdk/Contents/Home/bin/javac -version
javac 13

 

Java Applet Plugin on Mac Computer

JVM Framework Directories on Mac Computer

Using JDK 17 on Mac Computer

⇑⇑ FAQ for JDK (Java Development Kit) 17

2023-08-09, 441🔥, 0💬