I just upgraded my macOS Catalina from 10.15.3 -> 10.15.4 and I cannot run java in IntelliJ anymore.
I managed to get it working from Terminal by applying caveats from brew
:
➜ ~ brew reinstall java
==> Reinstalling openjdk
==> Downloading https://homebrew.bintray.com/bottles/openjdk-13.0.2+8_2.catalina.bottle.tar.gz
Already downloaded: /Users/jactor/Library/Caches/Homebrew/downloads/0dd8815aa4758e78a47b642bf541e2ada54d5067a8742b33b309989b77d0741b--openjdk-13.0.2+8_2.catalina.bottle.tar.gz
==> Pouring openjdk-13.0.2+8_2.catalina.bottle.tar.gz
==> Caveats
For the system Java wrappers to find this JDK, symlink it with
sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
openjdk is keg-only, which means it was not symlinked into /usr/local,
because it shadows the macOS `java` wrapper.
If you need to have openjdk first in your PATH run:
echo 'export PATH="/usr/local/opt/openjdk/bin:$PATH"' >> ~/.zshrc
For compilers to find openjdk you may need to set:
export CPPFLAGS="-I/usr/local/opt/openjdk/include"
==> Summary
???? /usr/local/Cellar/openjdk/13.0.2+8_2: 631 files, 314.6MB
When I start IntellJ, a pop-up from Mac says:
"openjdk-13.0.1.jdk” cannot be opened because the developer cannot be verified.
macOS cannot verify that this app is free from malware.
Homebrew Cask downloaded this file on 3 December 2019 from openjdk.java.net.
How to fix this? Is the file cached (from December) not being updated?
sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
worked for me. – Shrukul Habib