matthiasblaesing commented on code in PR #8725:
URL: https://github.com/apache/netbeans/pull/8725#discussion_r2291888606
##########
platform/o.n.bootstrap/launcher/unix/nbexec:
##########
@@ -157,16 +157,22 @@ 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 [ ! -z "x${JAVA_HOME}" ]; then
Review Comment:
What is the idea here? This can't work and in fact does not. If JAVA_HOME is
not set, this evaluates:
- `! -z "x${JAVA_HOME}"`
- `! -z "x"`
- `! false`
- `true`
And with any other value this is the same as the zero length check will only
ever check a longer path.
Let me repeat the test setup:
- no `JAVA_HOME` set
- java and javac on the `PATH`
- build from PR and run in base directory: `nbbuild/netbeans/bin/netbeans
--userdir x --cachedir x` (ensure, that directory x does not exist prior)
--
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