JDK 14 and macOS Catalina – issue with unidentified developer
After installing JDK 14, as soon as you try to compile simple Hello world! application you will notice following issue
“jdk-14.jdk” is damaged and can’t be opened
![](http://www.owsiak.org/wp-content/uploads/2020/02/error_jdk.png)
This issue can be solved by moving Info.plist into backup file (e.g. one with ~ at the end).
> cd /Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents > sudo mv Info.plist Info.plist~
However, this will not solve your problems completely. There is one more thing to do. If you try to execute javac, after this small “fix”
> /Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/bin/javac
you will be shown the message
“classes.jsa” cannot be opened because the developer cannot be verified.
![](http://www.owsiak.org/wp-content/uploads/2020/02/message_1.png)
Press Cancel as many times as needed (don’t Move to Bin). Then open
System Preferences -> Security & Privacy -> Allow Anyway
![](http://www.owsiak.org/wp-content/uploads/2020/02/message_2.png)
Run javac again. This time, you will get yet another warning.
macOS cannot verify the developer of “classes.jsa”. Are you sure you want to open it?
![](http://www.owsiak.org/wp-content/uploads/2020/02/message_3.png)
As you can see you are now free to Open application.
You can also take alternative path by removing com.apple.quarantine from the files that are coming with JDK installation.
> xattr -l /Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/bin/javac com.apple.quarantine: 0082;5e42e60f;Safari;
As you can see, in my case all the downloaded files were put into quarantine by Safari. You can remove this attribute following way
> sudo xattr -r -d com.apple.quarantine /Library/Java/JavaVirtualMachines/jdk-14.jdk/
and you are ready to go
> /Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/bin/javac Hello.java > /Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/bin/java Hello Hello world!
Have fun!