Script Friendly Download

Java Download offers script friendly download commands that can be distributed to non-OCI users in the enterprise who can use them in scripts to download Oracle Java runtimes without having to accept licenses or verify entitlements.

Tokens are associated with each download command and are generated for each Java version by, if applicable, accepting the license terms so that it can be distributed to non-OCI users in the enterprise. As the token is already associated with a Java version and license acceptance, any user can use them to download Java without additional license acceptance or entitlement checks. This makes it suitable for scripts and docker files, similar to JDK script friendly URLs. You can also get commands to retrieve checksum information for each package that is available through Java Download.

The script friendly download command is valid only if:

  • A token is part of the download command
  • The token is associated with the main version of the release
  • The token is associated with the license type of the release
  • The token is active, and not expired or revoked

There are two types of script friendly commands:

  • Latest: download commands in /java/<version>/latest/<fileNameWithExtn> format always gives you the latest release in the selected version when used in script or docker files. These are available from releases under the Current releases table.
    Here is the format of how the latest download command may be used:
    curl -H "token:<$token>" -L -O <domain>/java/<version>/latest/<fileNameWithExtn>
    Example: If you need to retrieve the latest version of JDK 17 using scripts, without having to update the scripts:
    • Include the latest download command associated with the required binary, for instance /java/17/latest/jdk-17_windows-x64_bin.zip in your script.
    • Run this command to always get the latest version of JDK 17. For instance, if you run this command in Nov 2023, you will get JDK version 17.0.9 and in Feb 2024, you will get JDK version 17.0.10.
    • Latest command valid till JDK 17 reaches EOSL or if the token expires (whichever is earlier)
  • Archive: download commands in /java/<version>/archive/<fileNameWithExtn> format always gives you the specific release of a version. These are available from releases under the Archive releases table.
    Here is the format of how the archive download command may be used:
    curl -H "token:<$token>" -L -O <domain>/java/<version>/archive/<fileNameWithExtn>
    Example: If you need to retrieve a specific JDK 17 version, say 17.0.9 using scripts, without having to update the scripts:
    • Include the archive download command associated with the required binary, for instance /java/17/archive/jdk-17.0.9_windows-x64_bin.zip in your script.
    • Run this command to always get JDK 17.0.9.
    • Archive command is valid until the binary is available in Java Download (2 years after the release date) or if the token expires (whichever is earlier)