Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update project to OpenJDK 21 #1222

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.

1 change: 1 addition & 0 deletions ant/linux/installer.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<project name="linux-installer" basedir="../../">
<property file="ant/project.properties"/>
<property file="ant/linux/linux.properties"/>
<import file="${basedir}/ant/version.xml"/>
<import file="${basedir}/ant/platform-detect.xml"/>

Expand Down
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