stoty commented on code in PR #8725:
URL: https://github.com/apache/netbeans/pull/8725#discussion_r2282991063


##########
platform/o.n.bootstrap/launcher/unix/nbexec:
##########
@@ -157,16 +157,24 @@ if [ -z "$jdkhome" ] ; then
                 jdkhome="/Library/Internet 
Plug-Ins/JavaAppletPlugin.plugin/Contents/Home"
             fi
             ;;
-            *) javac=`which javac`
-            if [ -z "$javac" ] ; then
-                java=`which java`
-                if [ ! -z "$java" ] ; then
-                    java=`resolve_symlink "$java"`
-                    jdkhome=`dirname $java`"/.."
-                fi
+            *)
+            if [ "x" != "x${JAVA_HOME}" -a -x "${JAVA_HOME}/bin/java" ]; then

Review Comment:
    -a is used in this same script elsewhere, but I'm not particular about the 
implementation details.
    I'm not confident in shell programming, so I just copy what already see 
used.
    
    I was wondering how to handle the empty JAVA_HOME.
    I thought that "" is probably an error, if someone puts the JDK it in the 
root directory, they should use "/" instead.
    
    But again, it's fine either way for me.
    
    If you have a strong preference, LMK and I will change it.



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

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

Reply via email to