From 59f86775f5ca6dddf562e727d5702a549648f648 Mon Sep 17 00:00:00 2001 From: wcgunter Date: Wed, 21 Feb 2024 17:31:32 -0500 Subject: [PATCH] Change how we determine the Java version (use Runtime.version() instead of setting environment variable) --- cws-service/src/main/java/jpl/cws/controller/MvcCore.java | 2 +- utils.sh | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cws-service/src/main/java/jpl/cws/controller/MvcCore.java b/cws-service/src/main/java/jpl/cws/controller/MvcCore.java index 48936709..fa2bd808 100755 --- a/cws-service/src/main/java/jpl/cws/controller/MvcCore.java +++ b/cws-service/src/main/java/jpl/cws/controller/MvcCore.java @@ -184,7 +184,7 @@ protected ModelAndView buildConfigurationModel(String message) { model.addObject("historyDaysToLive", historyDaysToLive); model.addObject("historyLevel", historyLevel); model.addObject("javaHome", System.getenv("JAVA_HOME")); - model.addObject("javaVersion", System.getenv("JAVA_HOME_VERSION")); + model.addObject("javaVersion", Runtime.version().toString()); model.addObject("camundaVersion", System.getenv("CAMUNDA_VER")); DiskUsage diskUsage = cwsConsoleService.getDiskUsage(); diff --git a/utils.sh b/utils.sh index 59d3d590..a1c4c54d 100755 --- a/utils.sh +++ b/utils.sh @@ -140,7 +140,6 @@ function check_java_requirements () { JAVA_HOME_VERSION=$("${JAVA_HOME}/bin/java" -version 2>&1 | awk -F '"' '/version/ {print $2}') print " JAVA_HOME Java version : ${JAVA_HOME_VERSION}" - export JAVA_HOME_VERSION="${JAVA_HOME_VERSION}" JAVA_PATH_VERSION=$(java -version 2>&1 | awk -F '"' '/version/ {print $2}') print " PATH Java version : ${JAVA_PATH_VERSION} $(which java)"