How to run an app that require Java SDK on macOS Catalina 10.15?
Open System Preferences -> Security &amp; Privacy -> General, there should be a message about the JDK app, click Allow.

Run the Java-based app again (e.g.: type java -version in the Terminal app). A dialog should appear confirming you trust OpenJDK.

Source: https://apple.stackexchange.com/a/372235/35845