I recently upgraded my laptop to macOS 10.15.4 and now Java will not run from the command line (or anywhere else from what I can tell) I just see this error message:
“jdk-11.0.2.jdk” cannot be opened because the developer cannot be verified
I recently upgraded my laptop to macOS 10.15.4 and now Java will not run from the command line (or anywhere else from what I can tell) I just see this error message:
“jdk-11.0.2.jdk” cannot be opened because the developer cannot be verified
Try this:
You should only have to do these steps once.
Solved this by using this answer.
Disable the macOS Gatekeeper:
sudo spctl --master-disable
Run the apps that you need to have access to that JDK.
Re-enable the macOS Gatekeeper:
sudo spctl --master-enable
It appears that the permission to open those apps, and verify the developer, is remembered.
I had to run java from the command line in order to trigger the button in in Security and Privacy to appear when it allowed jdk tools like java and javac to run permanently.
The part that was tripping me up was if I ran the program from Iterm2 https://www.iterm2.com/ which is how I normally run command lines it did not work. I had to run from the built in terminal.
Maybe this is because I am still on bash instead of zsh? At any rate if you run Iterm2 and are having this problem try from the normal system terminal.