This is an automated email from the ASF dual-hosted git repository.
more pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/knox.git
The following commit(s) were added to refs/heads/master by this push:
new fa9e1e793 KNOX-3049 Fix startup for JDK17 (#922)
fa9e1e793 is described below
commit fa9e1e793fc15e7d8b484f992cfb3809d536f421
Author: Sandeep Moré <[email protected]>
AuthorDate: Thu Jun 27 13:19:54 2024 -0400
KNOX-3049 Fix startup for JDK17 (#922)
---
gateway-release-common/home/bin/knox-functions.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gateway-release-common/home/bin/knox-functions.sh
b/gateway-release-common/home/bin/knox-functions.sh
index 726ff85a6..c163e532f 100644
--- a/gateway-release-common/home/bin/knox-functions.sh
+++ b/gateway-release-common/home/bin/knox-functions.sh
@@ -177,7 +177,7 @@ function buildAppJavaOpts {
fi
# Add properties to enable Knox to run on JDK 17
- JAVA_VERSION=$(java -version 2>&1 | awk -F '"' '/version/ {print $2}')
+ JAVA_VERSION=$("$JAVA" -version 2>&1 | awk -F '"' '/version/ {print $2}')
CHECK_VERSION_17="17"
if [[ "$JAVA_VERSION" == *"$CHECK_VERSION_17"* ]]; then
echo "Java version is $CHECK_VERSION_17. Adding properties to enable
Knox to run on JDK 17"