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.
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.
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.
When untar'ed move the JDK folder into
/Library/Java/JavaVirtualMachines and you're done.
The Answer /steps from oracle worked for me, i'm using homebrew instead of tarballs https://www.oracle.com/technetwork/java/javase/using-jdk-jre-macos-catalina-5781620.html