bell-sw / Liberica

Free and 100% open source Progressive Java Runtime for modern Java™ deployments supported by a leading OpenJDK contributor
https://bell-sw.com/pages/libericajdk/
GNU General Public License v2.0
318 stars 29 forks source link

cannot be opened because the developer cannot be verified #128

Closed zhangyulai closed 1 year ago

zhangyulai commented 1 year ago

When I use the tar.gz version of jdk11 and jdk17 on my Mac, I get an error "cannot be opened because the developer cannot be verified". How to solve this problem? Thanks!

morgion commented 1 year ago

Could you please provide more details on this subject:

  1. Which version of MacOS do you use?
  2. Which version of Liberica JDK?

Also it would be good to check your security settings. Described behavior might depend on the following setting (system preferences -> security & privacy -> general tab):

image

Try to set option to the second variant - 'App Store and identified developers '

Thanks.

zhangyulai commented 1 year ago

My MacOS is 13.3.1, and the security settings is 'App Store and identified developers'.

I downloaded a tar.gz jdk, unpacked it and configured the environment variables. https://download.bell-sw.com/java/11.0.18+10/bellsoft-jdk11.0.18+10-macos-amd64.tar.gz

Then, when I executed the command - 'java -version', I was prompted with an error - 'java cannot be opened because the developer cannot be verified'

Thanks.

morgion commented 1 year ago

Thanks for information! Lets try other possibilities and check output of the following commands:

xattr -v bellsoft-jdk11.0.18+10-macos-amd64.tar.gz

After unpacking:

xattr -v jdk-11.0.18.jdk/
xattr -v jdk-11.0.18.jdk/bin/java

Yet another one posibility is that you download bundle using Safari and it is stored in Downloads directory which is under system control. Just copy downloaded bundle to other directory and remove quarantine attribute with

xattr -d com.apple.quarantine bellsoft-jdk11.0.18+10-macos-amd64.tar.gz

Then unpack, check xattr on directory and java executable - there should not be quarantine attribute. I hope after this steps it will work as expected.

zhangyulai commented 1 year ago

Thanks for solving my problem!