-if [ -x "$yppdir/java/bin/java" ]; then
- if [ -d "$yppdir/java/jre" ]; then
- echo " yohoho/java/bin and yohoho/java/jre exist, good"
- javadir="$yppdir/java"
- else
- absjava=`readlink -f "$yppdir/java/bin/java"`
- cat <<END
- yohoho/java/bin exists but yohoho/java/jre does not
- abs. java: "$absjava"
-END
- case "$absjava" in
- */jre/bin/java)
- echo " found jre directory, good"
- javadir="${absjava%/jre/bin/java}"
- ;;
- *)
- echo " java binary not in jre dir as expected, hmm."
- ;;
- esac
- fi
-fi
-
-if [ "x$javadir" = x ] && [ x"$JAVA_HOME" != x ] && \
- [ -x "$JAVA_HOME/bin/java" ]; then
-cat <<END
- yohoho/java/bin/java nonexistent or unsuitable, trying JAVA_HOME"
- JAVA_HOME: "$JAVA_HOME"
-END
- if [ -d "$JAVA_HOME/jre" ]; then
- javadir="$JAVA_HOME"
- else
- echo " JAVA_HOME has no jre subdirectory, hmm."
- fi