neilcsmith-net commented on code in PR #8725:
URL: https://github.com/apache/netbeans/pull/8725#discussion_r2284801169
##########
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:
Ah, OK, leave `-a` (if the `and` is required at all). I'd missed that it
was used elsewhere - we should rethink them all at some point.
And empty `JAVA_HOME` should surely be treated the same as unset. In fact,
not sure how easily we could check the difference in all cases. I still think
a check for `JAVA_HOME` being non-zero length without the additional `-x` check
would be enough here anyway. I'm not sure an invalid `JAVA_HOME` should just
be ignored.
Will let others comment on that.
--
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