I get the above message when trying to run my JDK. I installed it last week and it works fine during the day. I then Shutdown my laptop and when I re-start it the next day I get this message when I try running my Java application or when I try java -version from the Terminal window.

My macOs is, macOS 10.15.4 (19E287) - Catalina

I have other versions of the Java JDK installed on my laptop and haven't had any problems previously with those....so am a bit confused why I am getting this now.

One thing I should mention is that after I have untar'd the JDK download I then untar the JMC-7 package (Java Mission Control), jmc-7.0.1+01_osx-x64_bin/JDK Mission Control.app into the /Library/Java/JavaVirtualMachines/jdk-14.0.1.jdk/Contents/Home directory..... I am not sure if this maybe part of the issue ?

From exchanging some comments on a similar issue se-372017 I wonder if Apple OS notices the change to the JDK directory and thinks its maybe some malicious behaviour... how to tell macOs that its ok to ignore this check ?

Has anyone else seen this issue and has a fix for it ?

I could rm the JDK directory and re-untar the downloaded package again but I dont want to have to do this everyday !

  • 1
    apple.stackexchange.com/questions/58050/… Remove the xattr from the file
    – anki
    Commented Jun 15, 2020 at 9:13
  • 1
    @ankii thank you - I tried following that using, sudo xattr -rc /Library/Java/JavaVirtualMachines/jdk-14.0.1.jdk/Contents/Home/bin/java but still get the same message ? should I issue the command to the top level directory, sudo xattr -rc /Library/Java/JavaVirtualMachines/jdk-14.0.1.jdk/ rather than the application maybe ?
    – robbie70
    Commented Jun 15, 2020 at 9:41
  • At least for me, sudo xattr -rc /path/to/jdk- did fix the error, yes.
    – CletusW
    Commented Dec 5, 2020 at 5:49

2 Answers 2


I think the problem might be that after I've installed the JDK I then go ahead and unzip (untar) the JFR (including JMC) package into a sub-directory of the JDK. I think that macOS detects that there has been a change and tries to protect you incase its a malicious virus attack.

I tried installing the JFR in a separate directory and then initially I got the same message when trying to run it. But then I found a post which suggested going into the macOS> System Preferences - Security & Privacy screen and there was a message asking if I wanted to give permission for this application (Java Mission Control) to run. I did and its worked fine since.

  • Yes that seems OK Treat all bundles and apps as something you cannot alter using finder or text editors.
    – mmmmmm
    Commented Jun 24, 2020 at 17:21

This will fix it sudo xattr -r -d com.apple.quarantine /Library/Java/JavaVirtualMachines/<jdk-version>

  • 4
    It’s helpful to explain what the command does to help less experienced users learn what the problem is and how this solved the issue
    – Allan
    Commented Mar 28, 2023 at 20:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .