Recent versions of IntelliJ can download a JDK for the convenience of the user.
However, those downloaded JDKs are not appearing in the canonical place, at least not on my Mac:
/Library/Java/JavaVirtualMachines
So where are the downloaded JDKs being stored?
I would like to inspect them, and possibly delete some.
I have found this documentation page, SDKs, but did not see the storage location mentioned there.
/Users/your_username_here/Library/Java/JavaVirtualMachines/
You can inspect the JDKs known to IntelliJ by choosing File > Project Structure > Platform Settings > SDKs.
Notice how the location of the selected JDK is shown in the JDK home path field.
In this example, the JDK downloaded by IntelliJ was put in:
/Users/your_username_here/Library/Java/JavaVirtualMachines/
Note that this location contrasts with the location used by some of the independent JDK installers. In my experience, those tools use the root /Library
path, rather than in the user’s ~/Library
. That full path would be: /Library/Java/JavaVirtualMachines
.
By the way, an alternative tool I prefer for finding, downloading, installing, and uninstalling JDKs (and other software kits like Gradle) is SDKMAN!. It is a command-line tool for Unix-like operating systems including macOS.