This is an automated email from the ASF dual-hosted git repository.

lkishalmi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new badeff7  Fix call to find jdkhome using /usr/libexec/java_home for 
macOS Big Sur.
badeff7 is described below

commit badeff790fc663e0c1cd7596099ca12008839117
Author: Christian Oyarzun <oyar...@apache.org>
AuthorDate: Tue Nov 17 14:55:03 2020 -0500

    Fix call to find jdkhome using /usr/libexec/java_home for macOS Big Sur.
---
 platform/o.n.bootstrap/launcher/unix/nbexec | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/platform/o.n.bootstrap/launcher/unix/nbexec 
b/platform/o.n.bootstrap/launcher/unix/nbexec
index f59096a..dc8ca07 100755
--- a/platform/o.n.bootstrap/launcher/unix/nbexec
+++ b/platform/o.n.bootstrap/launcher/unix/nbexec
@@ -140,10 +140,13 @@ if [ -z "$jdkhome" ] ; then
         # try to find JDK
         case "`uname`" in
             Darwin*)
+            # check if JAVA_HOME is empty string since java_home will return 
the value of JAVA_HOME
+            if [ -z "$JAVA_HOME" ]; then
+                unset JAVA_HOME
+            fi
             # read Java Preferences
             if [ -x "/usr/libexec/java_home" ]; then
-                jdkhome=`/usr/libexec/java_home --version 1.8.0+ --failfast`
-
+                jdkhome=`/usr/libexec/java_home --version 1.8+`
             # JDK1.8 as a fallback
             elif [ -f 
"/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/bin/java" ] ; then
                 
jdkhome="/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home"


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to