Skip to content

Commit 5cbf1e0

Browse files
authored
Set JVM enable-native-access for Java 17+ (#3819)
1 parent f1cacb7 commit 5cbf1e0

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
4949
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
5050
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
5151

52-
ARG MC_HELPER_VERSION=1.52.0
52+
ARG MC_HELPER_VERSION=1.52.1
5353
ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
5454
# used for cache busting local copy of mc-image-helper
5555
ARG MC_HELPER_REV=1

scripts/start-configuration

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ shopt -s nullglob
2828

2929
isDebugging && set -x
3030

31-
#umask 002
31+
if (( $(mc-image-helper java-release) >= 17 )); then
32+
MC_IMAGE_HELPER_OPTS+=" --enable-native-access=ALL-UNNAMED"
33+
export MC_IMAGE_HELPER_OPTS
34+
fi
35+
3236
export HOME=/data
3337

3438
log "Running as uid=$(id -u) gid=$(id -g) with /data as '$(ls -lnd /data)'"

0 commit comments

Comments
 (0)