pan3793 commented on code in PR #2874:
URL: https://github.com/apache/celeborn/pull/2874#discussion_r3302345005


##########
sbin/load-celeborn-env.sh:
##########
@@ -44,12 +44,24 @@ if [ -n "${JAVA_HOME}" ]; then
 else
   if [ "$(command -v java)" ]; then
     export JAVA="java"
+    JAVA_HOME=$(java -XshowSettings:properties -version 2>&1 > /dev/null | 
grep 'java.home' | awk '{print $3}')
   else
     echo "JAVA_HOME is not set" >&2
     exit 1
   fi
 fi
 
+# Find the java tools.jar
+if [ -f "${JAVA_HOME}/lib/tools.jar" ]; then
+  export JAVA_TOOLS_JAR="${JAVA_HOME}/lib/tools.jar"
+else
+  if [ -f "${JAVA_HOME}/../lib/tools.jar" ]; then
+    export JAVA_TOOLS_JAR="${JAVA_HOME}/../lib/tools.jar"
+  else
+    echo "WARNING: cannot locate tools.jar. Expected to find it in either 
${JAVA_HOME}/lib/tools.jar or ${JAVA_HOME}/../lib/tools.jar"

Review Comment:
   is this only required for Java 8 ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to