The latest versions of Oracle JDK, available under the Oracle No-Fee Terms and Conditions License, and of Oracle GraalVM, available under the GraalVM Free Terms and Conditions, can be downloaded from a command line, or automatically in scripts and dockerfiles by using download URLs which will deliver the then-current update release.
For example, to retrieve the current JDK 23 update release for Linux x64 as a compressed (tar.gz) archive, you can use
the
wget
command:
wget https://download.oracle.com/java/23/latest/jdk-23_linux-x64_bin.tar.gz
GraalVM releases are also available using a similar URL with
graalvm
instead of
java
in the path and added to the filename.
For example, to get the current version of GraalVM for JDK 23, for Linux x64 as a compressed (tar.gz) archive, use:
wget https://download.oracle.com/graalvm/23/latest/graalvm-jdk-23_linux-x64_bin.tar.gz
curl
:
curl https://download.oracle.com/java/23/latest/jdk-23_linux-x64_bin.tar.gz
curl https://download.oracle.com/graalvm/23/latest/graalvm-jdk-23_linux-x64_bin.tar.gz
https://download.oracle.com/java/23/latest/jdk-23_linux-x64_bin.tar.gz.sha256
https://download.oracle.com/graalvm/23/latest/graalvm-jdk-23_linux-x64_bin.tar.gz.sha256
These URLs will deliver the initial releases of JDK 23 and of GraalVM for JDK 23 with their respective checksums until the release of JDK 23.0.1 in October of 2024. The URLs will then deliver 23.0.1 until the release of 23.0.2 in January of 2025, and will deliver 23.0.2 until JDK 23 reaches end of life in March of 2025 (when JDK 24 URLs will become available).
URLs for supported JDK versions available under the Oracle No-Fee Terms and Conditions License and for GraalVM versions released under the GraalVM Free Terms and Conditions are supported.
There are several OS, architecture, and packaging options available. The following table lists them as they are spelled in the permanent URLs:
Operating Systems | Architecture | JDK Packaging Options | GraalVM Packaging Options |
---|---|---|---|
linux | aarch64 | rpm, tar.gz | tar.gz |
x64 | deb, rpm, tar.gz | tar.gz | |
macos | aarch64 | dmg, tar.gz | tar.gz |
x64 | dmg, tar.gz | tar.gz | |
windows | x64 | exe, msi, zip | zip |
For a complete list of scriptable JDK URLs visit https://www.oracle.com/javadownload
If rather than the latest update of a release you want to download a particular version, there are corresponding archive URLs that will start working on the day on which that version is released. The archive URLs use the full version number on the filename and have the word `archive`
instead of `latest`
in the path.
For example:
To download the GA version of JDK 23 you can use:
https://download.oracle.com/java/23/archive/jdk-23_linux-x64_bin.tar.gz
for JDK 21.0.4 you can use:
https://download.oracle.com/java/21/archive/jdk-21.0.4_linux-x64_bin.tar.gz
for the GA version of GraalVM for JDK 23 version use:
https://download.oracle.com/graalvm/23/archive/graalvm-jdk-23_linux-x64_bin.tar.gz
for GraalVM for JDK 21.0.4 version use:
https://download.oracle.com/graalvm/21/archive/graalvm-jdk-21.0.4_linux-x64_bin.tar.gz
for JDK 21.0.3 version use:
https://download.oracle.com/java/21/archive/jdk-21.0.3_linux-x64_bin.tar.gz
The archive releases also have corresponding archive URLs for the checksum.
For example, to retrieve the checksum for
jdk-21.0.1_linux-x64_bin.tar.gz
visit:
https://download.oracle.com/java/21/archive/jdk-21.0.1_linux-x64_bin.tar.gz.sha256
For example, to retrieve the checksum for
graalvm-jdk-21.0.1_linux-x64_bin.tar.gz
visit:
https://download.oracle.com/graalvm/21/archive/graalvm-jdk-21.0.1_linux-x64_bin.tar.gz.sha256
Here is a fraction of a sample docker file that will download the current JDK 21 version as a tar.gz, check the
download against it’s checksum, and extract it to
/usr/java/jdk-21
ENV JAVA_PKG=https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.tar.gz \
JAVA_HOME=/usr/java/jdk-21
RUN set -eux; \
JAVA_SHA256=$(curl "$JAVA_PKG".sha256) ; \
curl --output /tmp/jdk.tgz"$JAVA_PKG" && \
echo "$JAVA_SHA256 */tmp/jdk.tgz" | sha256sum -c; \
mkdir -p "$JAVA_HOME"; \
tar --extract --file /tmp/jdk.tgz --directory "$JAVA_HOME" --strip-components 1
The complete Dockerfile is available in Oracle’s docker image repository in GitHub. The container image created with this Dockerfile is available in the Oracle Container Registry.
The latest URLs will continue to work for as long as an up-to-date version of the JDK in question is available under the Oracle No-Fee Terms and Conditions License and an up-to-date version of GraalVM for that JDK is available under the GraalVM Free Terms and Conditions.
JDK 23 and GraalVM for JDK 23 latest URLs will work for six months after GA; up to the release of JDK 24 in March of 2025. They will cease to work on April of 2025, with the release of the first Critical Patch Update that does not include an update of JDK 23.
JDK 21 LTS and GraalVM for JDK 21 LTS latest URLs will work for three years after GA and one year after the next JDK LTS release is available. They will cease to work on October of 2026.
JDK 17 LTS and GraalVM for JDK 17 LTS latest URLs are no longer available. They were available for three years after GA and one year after the next JDK LTS release. They stopped working on October of 2024. Java SE Subscribers and customers using Oracle Cloud Infrastructure can continue getting updates for JDK 17 and GraalVM for JDK 17; other users should migrate to the next LTS.
The archive URLs for each release will continue to work for at least a year after the corresponding latest URLs stop being available.
Although the latest URLs for JDK 17 are no longer available, the archive URLs for JDK 17 LTS releases 17.0.12 and earlier continue to work until October of 2025; one year after the the corresponding latest URLs were disabled.