Cannot install JDK 13.01 on Catalina
I tried to install the x64 version of jdk (from https://www.oracle.com/technetwork/java/javase/downloads/jdk13-downloads-5672538.html), however, Apple refused to install it saying that the software needs to be updated.
Since this is the latest version of JDK, what should I do in order to install java without waiting for the next update from Oracle?
Just run
xattr -d com.apple.quarantine jdk-13.0.1_osx-x64_bin.dmg
to remove the download quarantine flag attribute.
As per Utsav T's comment, it is important to unmount and remount the installer (jdk-13.0.1_osx-x64_bin.dmg) to make sure that the installer works correctly.
After removing the quarantine flag attribute, install as usual.
- Open "System Preference".
- Go to "Security & Privacy" then "General" tab
- Click on the lock icon then enter the password.
- There will be a button "Always Allow" to allow "jdk-13.0.1". Click on it.
You can install it via Homebrew.
- Install Homebrew.
- Install Java with Homebrew by running
brew install --cask java
Note the installation path in the output, it should be something like
==> Moving Generic Artifact 'jdk-13.0.1.jdk' to '/Library/Java/JavaVirtualMachines/openjdk-13.0.1.jdk'.
- Remove quarantine status from the just installed Java SDK by running
xattr -r -d com.apple.quarantine /Library/Java/JavaVirtualMachines/openjdk-13.0.1.jdk
(don't forget to replace the the path to JDK with the installation path from step 2, as the JDK version might change.)
You can use the tar.gz file instead - the below are the same JDK.
Oracle JDK: https://download.oracle.com/otn-pub/java/jdk/13.0.1+9/cec27d702aa74d5a8630c65ae61e4305/jdk-13.0.1_osx-x64_bin.tar.gz
or download the OpenJDK: https://download.java.net/java/GA/jdk13.0.1/cec27d702aa74d5a8630c65ae61e4305/9/GPL/openjdk-13.0.1_osx-x64_bin.tar.gz
When untar'ed move the JDK folder into /Library/Java/JavaVirtualMachines
and you're done.