diff --git a/devspaces-udi/etc/entrypoint.sh b/devspaces-udi/etc/entrypoint.sh index abbb66e378..bd9806d4f7 100755 --- a/devspaces-udi/etc/entrypoint.sh +++ b/devspaces-udi/etc/entrypoint.sh @@ -47,19 +47,19 @@ fi # use java 17 if USE_JAVA17 is set to 'true', # by default it is java 11 ############################################################################# -rm -rf "${HOME}"/.java/current -mkdir -p "${HOME}"/.java/current +rm -rf /home/tooling/.java/current +mkdir -p /home/tooling/.java/current if [ "${USE_JAVA8}" == "true" ] && [ ! -z "${JAVA_HOME_8}" ]; then - ln -s "${JAVA_HOME_8}"/* "${HOME}"/.java/current + ln -s "${JAVA_HOME_8}"/* /home/tooling/.java/current echo "Java environment set to ${JAVA_HOME_8}" elif [ "${USE_JAVA17}" == "true" ] && [ ! -z "${JAVA_HOME_17}" ]; then - ln -s "${JAVA_HOME_17}"/* "${HOME}"/.java/current + ln -s "${JAVA_HOME_17}"/* /home/tooling/.java/current echo "Java environment set to ${JAVA_HOME_17}" else # End of Support for OpenJDK 11 in October 2024 # https://access.redhat.com/articles/1299013 echo "TODO: it needs to set JDK 17 as default before OpenJDK 11 hits EOL in October 2024" - ln -s "${JAVA_HOME_11}"/* "${HOME}"/.java/current + ln -s "${JAVA_HOME_11}"/* /home/tooling/.java/current echo "Java environment set to ${JAVA_HOME_11}" fi