'Where does IntelliJ store the JDKs that it downloads on my behalf?

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.



Solution 1:[1]

tl;dr

/Users/your_username_here/Library/Java/JavaVirtualMachines/

Details

You can inspect the JDKs known to IntelliJ by choosing File > Project Structure > Platform Settings > SDKs.

Screenshot of IntelliJ's list of known SDKS with inspector for their location

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1