For those who miss rejected the jdkJDK execution (the confirmation dialog will not let you choose to open again) and there is no "allow" button found in the Security dialog, you will need the command line-line tool spctlspctl
:
# verify if you have rejected the app:
spctl --assess /path/to/jdk
# add app exception:
spctl --add /path/to/jdk
For those who just want to use the java executables in the command line, gotogo to:
System Preference > Security & Privacy > Privacy > Developer Tools
Add TerminalTerminal
, iTerm2iTerm2
or whatever applications you'd like to use