Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/java/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "java",
"version": "1.7.0",
"version": "1.7.2",
"name": "Java (via SDKMAN!)",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/java",
"description": "Installs Java, SDKMAN! (if not installed), and needed dependencies.",
Expand Down
16 changes: 16 additions & 0 deletions src/java/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,23 @@ if [ ! -d "${SDKMAN_DIR}" ]; then
usermod -a -G sdkman ${USERNAME}
umask 0002
# Install SDKMAN
# For RHEL 8 systems (glibc 2.28), disable native version to avoid glibc compatibility issues
# SDKMAN native binaries require glibc 2.30+ which is not available in RHEL 8 / AlmaLinux 8 / Rocky 8
if [ "${ADJUSTED_ID}" = "rhel" ] && [ "${MAJOR_VERSION_ID}" = "8" ]; then
export SDKMAN_NATIVE_VERSION="false"
fi
curl -sSL "https://get.sdkman.io?rcupdate=false" | bash
# For RHEL 8 systems, also disable native version in config file and remove native binaries
if [ "${ADJUSTED_ID}" = "rhel" ] && [ "${MAJOR_VERSION_ID}" = "8" ]; then
# Disable native version in config to prevent future usage
if [ -f "${SDKMAN_DIR}/etc/config" ]; then
sed -i 's/sdkman_native_version=.*/sdkman_native_version=false/' "${SDKMAN_DIR}/etc/config"
fi
# Remove native binaries if they were installed
if [ -d "${SDKMAN_DIR}/libexec" ]; then
rm -rf "${SDKMAN_DIR}/libexec"
fi
fi
chown -R "${USERNAME}:sdkman" ${SDKMAN_DIR}
find ${SDKMAN_DIR} -type d -print0 | xargs -d '\n' -0 chmod g+s
# Add sourcing of sdkman into bashrc/zshrc files (unless disabled)
Expand Down
Loading