java on macos

where is it, which version is running in the terminal?

the standard location for JDKs is:

/Library/Java/JavaVirtualMachines

IntelliJ IDEA JDK downloads are here:

/Users/<user>/Library/Java/JavaVirtualMachines

java_home shows the JDKs in both locations:

> /usr/libexec/java_home -V
 Matching Java Virtual Machines (4):
     14.0.1, x86_64:	"OpenJDK 14.0.1"	/Users/<user>/Library/Java/...
     11.0.2, x86_64:	"Java SE 11.0.2"	/Library/Java/...
     1.8.0_252, x86_64:	"OpenJDK 8"	/Users/<user>/Library/Java/...
     1.8.0_201, x86_64:	"Java SE 8"	/Library/Java/...

 /Users/<user>/Library/Java/JavaVirtualMachines/adopt-openjdk-14.0.1/Contents/Home

Last line is the active version in the terminal. It is the default response if it runs without any parameter.

> /usr/libexec/java_home
 /Users/<user>/Library/Java/JavaVirtualMachines/adopt-openjdk-14.0.1/Contents/Home