You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "mridulm (via GitHub)" <gi...@apache.org> on 2025/12/06 08:49:44 UTC
Re: [PR] [SPARK-53955][CORE][3.5] Prefer to detect Java Home from env JAVA_HOME on finding jmap for JDK 8 [spark]
mridulm commented on PR #52665:
URL: https://github.com/apache/spark/pull/52665#issuecomment-3619764499
hmm, JAVA_HOME can point to arbitrary path and need not be valid - right ?
Given that, we should check for validity of path (more precisely if jmap is actually present at `$JAVA_HOME/bin/jmap` ?
Example:
```
$ export JAVA_HOME=/dev/null
$ scala
Welcome to Scala 2.13.16 (OpenJDK 64-Bit Server VM, Java 17.0.17).
Type in expressions for evaluation. Or try :help.
scala> System.getenv("JAVA_HOME")
val res1: String = /dev/null
scala> System.getProperty("java.home")
val res2: String = /usr/lib/jvm/java-17-openjdk-amd64
scala>
```
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org