The latest versions of Oracle JDK, available under the Oracle No-Fee Terms and Conditions License, 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 25 update release for Linux x64 as a compressed (tar.gz) archive, you can use the wget command:
wget https://download.oracle.com/java/25/latest/jdk-25_linux-x64_bin.tar.gz
The command above would also work with curl:
curl https://download.oracle.com/java/25/latest/jdk-25_linux-x64_bin.tar.gz
The checksum for each download can be found by adding .sha256 to the download URL:
https://download.oracle.com/java/25/latest/jdk-25_linux-x64_bin.tar.gz.sha256
These URLs will deliver the initial release of JDK 25 with their respective checksums until the release of JDK 25.0.1 in October of 2025. The URLs will then deliver 25.0.1 until the release of 25.0.2 in January of 2026, and will deliver 25.0.2 until the April 2026 update, and so on, always delivering the then-current JDK 25 version until September of 2028, a year after the release of the next Long-Term Support (LTS).
URLs for supported JDK versions available under the Oracle No-Fee Terms and Conditions License 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 |
|---|---|---|
| linux | aarch64 | rpm, tar.gz |
| x64 | deb, rpm, tar.gz | |
| macos | aarch64 | dmg, tar.gz |
| x64 | dmg, tar.gz | |
| windows | x64 | exe, msi, 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 25 you can use:
https://download.oracle.com/java/25/archive/jdk-25_linux-x64_bin.tar.gz
for JDK 21.0.8 you can use:
https://download.oracle.com/java/21/archive/jdk-21.0.8_linux-x64_bin.tar.gz
for JDK 21.0.7 version use:
https://download.oracle.com/java/21/archive/jdk-21.0.7_linux-x64_bin.tar.gz
The archive releases also have corresponding URLs for the checksum.
For example, to retrieve the checksum for
jdk-21.0.5_linux-x64_bin.tar.gz from the archive visit:
https://download.oracle.com/java/21/archive/jdk-21.0.5_linux-x64_bin.tar.gz.sha256
Here is a fraction of a sample docker file that will download the current JDK 25 version as a tar.gz, check the
download against it’s checksum, and extract it to
/usr/java/jdk-25
ENV JAVA_PKG=https://download.oracle.com/java/25/latest/jdk-25_linux-x64_bin.tar.gz \
JAVA_HOME=/usr/java/jdk-25
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.
JDK 25 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 2028.
JDK 21 LTS latest URLs will work for three years after GA and one year after the JDK 25 LTS release. They will cease to work on October of 2026.
JDK 17 LTS latest URLs are no longer available. They were available for three years after GA and one year after the JDK 21 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; other users should migrate to the most recent 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 at least until October of 2025; one year after the corresponding latest URLs were disabled.