Skip to content

Commit

Permalink
Initial support for OpenJDK 21
Browse files Browse the repository at this point in the history
  • Loading branch information
tresf committed Nov 30, 2023
1 parent ca31751 commit 0eec8e2
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: [ubuntu-latest]
strategy:
matrix:
java: [11, 17]
java: [21]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
Expand All @@ -24,7 +24,7 @@ jobs:
runs-on: [macos-latest]
strategy:
matrix:
java: [11, 17]
java: [21]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
Expand All @@ -47,7 +47,7 @@ jobs:
runs-on: [windows-latest]
strategy:
matrix:
java: [11, 17]
java: [21]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
Expand Down
3 changes: 1 addition & 2 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/App.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions ant/linux/linux.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Expose UNIXToolkit.getGtkVersion
linux.launch.jigsaw=--add-opens java.desktop/sun.awt=ALL-UNNAMED
8 changes: 4 additions & 4 deletions ant/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ jar.index=true
separate.static.libs=true

# See also qz.common.Constants.java
javac.source=1.8
javac.target=1.8
javac.source=11
javac.target=11
java.download=https://bell-sw.com/pages/downloads/#/java-11-lts

# Java vendor to bundle into software (e.g. "*BellSoft|Adoptium|Microsoft|Amazon|IBM")
jlink.java.vendor="BellSoft"
# Java vendor to bundle into software (e.g. "11.0.17+7")
jlink.java.version="11.0.20.1+1"
# Java vendor to bundle into software (e.g. "21.0.1+12")
jlink.java.version="21.0.1+12"
# Java garbage collector flavor to use (e.g. "hotspot|openj9")
jlink.java.gc="hotspot"
# Java garbage collector version to use (e.g. openj9: "0.35.0", zulu: "11.62.17")
Expand Down
2 changes: 2 additions & 0 deletions ant/unix/unix-launcher.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ else
LAUNCH_OPTS="$LAUNCH_OPTS ${launch.jigsaw}"
if [[ "$OSTYPE" == "darwin"* ]]; then
LAUNCH_OPTS="$LAUNCH_OPTS ${apple.launch.jigsaw}"
else
LAUNCH_OPTS="$LAUNCH_OPTS ${linux.launch.jigsaw}"
fi
fi

Expand Down
6 changes: 5 additions & 1 deletion src/qz/build/JLink.java
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,11 @@ private JLink deployJre() throws IOException {
Files.copy(jmodsPath.resolve("../../MacOS/libjli.dylib").normalize(), jliLib, StandardCopyOption.REPLACE_EXISTING);
} catch(IOException ignore) {
// Fallback to flat format
Files.copy(jmodsPath.resolve("../lib/jli/libjli.dylib").normalize(), jliLib, StandardCopyOption.REPLACE_EXISTING);
String libjli = "../lib/jli/libjli.dylib";
if(javaSemver.getMajorVersion() >= 21) {
libjli = "../lib/libjli.dylib";
}
Files.copy(jmodsPath.resolve(libjli).normalize(), jliLib, StandardCopyOption.REPLACE_EXISTING);
}

// Deploy Contents/Info.plist
Expand Down

0 comments on commit 0eec8e2

Please sign in to comment.