Skip to content

Commit 5c58628

Browse files
author
Shelley Lambert
authored
Merge pull request #28 from sophia-guo/jdk11
update jdk11 boot JVM to be latest jdk11
2 parents 3915608 + e247689 commit 5c58628

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

dist/index.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3492,8 +3492,12 @@ function getBootJdk(version) {
34923492
if (parseInt(bootJDKVersion) > 8) {
34933493
let bootjdkJar;
34943494
// TODO: issue open openj9,mac, 10 ga : https://api.adoptopenjdk.net/v3/binary/latest/10/ga/mac/x64/jdk/openj9/normal/adoptopenjdk doesn't work
3495-
if (`${bootJDKVersion}` === '10' && `${targetOs}` === 'mac') {
3496-
bootjdkJar = yield tc.downloadTool(`https://github.com/AdoptOpenJDK/openjdk10-binaries/releases/download/jdk-10.0.2%2B13.1/OpenJDK10U-jdk_x64_mac_hotspot_10.0.2_13.tar.gz`);
3495+
if (`${bootJDKVersion}` === '10') {
3496+
//JDK 11 require a latest jdk11 as boot JVMhttps://github.com/eclipse-openj9/build-openj9/issues/25#issuecomment-848354452
3497+
bootjdkJar = yield tc.downloadTool(`https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk11u-2021-05-07-07-34/OpenJDK11U-jdk_x64_linux_openj9_2021-05-07-07-34.tar.gz`);
3498+
if (`${targetOs}` === 'mac') {
3499+
bootjdkJar = yield tc.downloadTool(`https://github.com/AdoptOpenJDK/openjdk10-binaries/releases/download/jdk-10.0.2%2B13.1/OpenJDK10U-jdk_x64_mac_hotspot_10.0.2_13.tar.gz`);
3500+
}
34973501
}
34983502
else {
34993503
bootjdkJar = yield tc.downloadTool(`https://api.adoptopenjdk.net/v3/binary/latest/${bootJDKVersion}/ga/${targetOs}/x64/jdk/openj9/normal/adoptopenjdk`);
@@ -3503,7 +3507,7 @@ function getBootJdk(version) {
35033507
yield exec.exec(`sudo tar -xzf ${bootjdkJar} -C ./bootjdk --strip=3`);
35043508
}
35053509
else if (`${targetOs}` === 'linux') {
3506-
if (`${bootJDKVersion}` === '10') {
3510+
if (`${bootJDKVersion}` === '10' && `${targetOs}` === 'mac') {
35073511
yield exec.exec(`sudo tar -xzf ${bootjdkJar} -C ./bootjdk --strip=2`); // TODO : issue open as this is packaged differently
35083512
}
35093513
else {

src/builder.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,16 +217,20 @@ async function getBootJdk(version: string): Promise<void> {
217217
if (parseInt(bootJDKVersion) > 8) {
218218
let bootjdkJar
219219
// TODO: issue open openj9,mac, 10 ga : https://api.adoptopenjdk.net/v3/binary/latest/10/ga/mac/x64/jdk/openj9/normal/adoptopenjdk doesn't work
220-
if (`${bootJDKVersion}` === '10' && `${targetOs}` === 'mac') {
221-
bootjdkJar = await tc.downloadTool(`https://github.com/AdoptOpenJDK/openjdk10-binaries/releases/download/jdk-10.0.2%2B13.1/OpenJDK10U-jdk_x64_mac_hotspot_10.0.2_13.tar.gz`)
220+
if (`${bootJDKVersion}` === '10') {
221+
//JDK 11 require a latest jdk11 as boot JVMhttps://github.com/eclipse-openj9/build-openj9/issues/25#issuecomment-848354452
222+
bootjdkJar = await tc.downloadTool(`https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk11u-2021-05-07-07-34/OpenJDK11U-jdk_x64_linux_openj9_2021-05-07-07-34.tar.gz`)
223+
if (`${targetOs}` === 'mac') {
224+
bootjdkJar = await tc.downloadTool(`https://github.com/AdoptOpenJDK/openjdk10-binaries/releases/download/jdk-10.0.2%2B13.1/OpenJDK10U-jdk_x64_mac_hotspot_10.0.2_13.tar.gz`)
225+
}
222226
} else {
223227
bootjdkJar = await tc.downloadTool(`https://api.adoptopenjdk.net/v3/binary/latest/${bootJDKVersion}/ga/${targetOs}/x64/jdk/openj9/normal/adoptopenjdk`)
224228
}
225229
await io.mkdirP('bootjdk')
226230
if (`${targetOs}` === 'mac') {
227231
await exec.exec(`sudo tar -xzf ${bootjdkJar} -C ./bootjdk --strip=3`)
228232
} else if (`${targetOs}` === 'linux') {
229-
if (`${bootJDKVersion}` === '10' ) {
233+
if (`${bootJDKVersion}` === '10' && `${targetOs}` === 'mac' ) {
230234
await exec.exec(`sudo tar -xzf ${bootjdkJar} -C ./bootjdk --strip=2`) // TODO : issue open as this is packaged differently
231235
} else {
232236
await exec.exec(`sudo tar -xzf ${bootjdkJar} -C ./bootjdk --strip=1`)

0 commit comments

Comments
 (0)