copperybean commented on a change in pull request #34111:
URL: https://github.com/apache/spark/pull/34111#discussion_r716736248



##########
File path: build/mvn
##########
@@ -21,7 +21,12 @@ SELF=$(cd $(dirname $0) && pwd)
 . "$SELF/util.sh"
 
 if [ -z "${JAVA_HOME}" -a "$(command -v javac)" ]; then
-  export JAVA_HOME="$(dirname $(dirname $(realpath $(command -v javac))))"
+  if [ x"$(uname -a | awk '{print $1}')" = xDarwin -a \
+      $(version $(sw_vers -productVersion)) -ge $(version 10.5) ]; then

Review comment:
       Well, it's a different problem with what you said. I mean, 
`/usr/libexec/java_home` is an OS behavior which provides a command to output 
the home path of Java, it's irrelevant with the problem that what version of 
macOS is Java8 supported.
   
   In other words, there are almost no one using mac OS with version less than 
10.5 according to the 
[statistic](https://www.statista.com/statistics/944559/worldwide-macos-version-market-share/),
 so it's not important already to check whether version is 10.5+ or not. So, I 
can remove it if you insist.




-- 
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to