File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed
platform/o.n.bootstrap/launcher/unix Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -157,16 +157,22 @@ if [ -z "$jdkhome" ] ; then
157157 jdkhome=" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home"
158158 fi
159159 ;;
160- * ) javac=` which javac`
161- if [ -z " $javac " ] ; then
162- java=` which java`
163- if [ ! -z " $java " ] ; then
164- java=` resolve_symlink " $java " `
165- jdkhome=` dirname $java ` " /.."
166- fi
160+ * )
161+ if [ ! -z " ${JAVA_HOME} " ]; then
162+ jdkhome=" ${JAVA_HOME} "
167163 else
168- javac=` resolve_symlink " $javac " `
169- jdkhome=` dirname $javac ` " /.."
164+ # Doesn't work with jenv-style shims
165+ javac=` which javac`
166+ if [ -z " $javac " ] ; then
167+ java=` which java`
168+ if [ ! -z " $java " ] ; then
169+ java=` resolve_symlink " $java " `
170+ jdkhome=` dirname $java ` " /.."
171+ fi
172+ else
173+ javac=` resolve_symlink " $javac " `
174+ jdkhome=` dirname $javac ` " /.."
175+ fi
170176 fi
171177 ;;
172178 esac
You can’t perform that action at this time.
0 commit comments