diff --git a/__tests__/distributors/oracle-installer.test.ts b/__tests__/distributors/oracle-installer.test.ts index ad16eca..356c0c6 100644 --- a/__tests__/distributors/oracle-installer.test.ts +++ b/__tests__/distributors/oracle-installer.test.ts @@ -22,6 +22,11 @@ describe('findPackageForDownload', () => { }); it.each([ + [ + '21', + '21', + 'https://download.oracle.com/java/21/latest/jdk-21_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}' + ], [ '20', '20', diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md index e13366d..48aecfd 100644 --- a/docs/advanced-usage.md +++ b/docs/advanced-usage.md @@ -121,7 +121,7 @@ steps: - uses: actions/setup-java@v3 with: distribution: 'oracle' - java-version: '17' + java-version: '21' - run: java -cp java HelloWorldApp ``` diff --git a/src/distributions/oracle/installer.ts b/src/distributions/oracle/installer.ts index 72a92fb..ec0ab21 100644 --- a/src/distributions/oracle/installer.ts +++ b/src/distributions/oracle/installer.ts @@ -88,8 +88,8 @@ export class OracleDistribution extends JavaBase { `${ORACLE_DL_BASE}/${major}/archive/jdk-${range}_${platform}-${arch}_bin.${extension}` ); - if (parseInt(major) < 21) { - throw new Error('Oracle JDK is only supported for JDK 21 and later'); + if (parseInt(major) < 17) { + throw new Error('Oracle JDK is only supported for JDK 17 and later'); } for (const url of possibleUrls) {