# setup java environment. # # This file uses apppath. Since it would clobber the PATH variable if apppath # isn't in the path, we just skip everything in this case. if whence apppath > /dev/null then for i in \ /usr/local/jdk-10.0.1 \ /usr/local/jdk1.8.0_112 \ /usr/local/java \ /usr/lib/java do if [ -d "$i/bin" ] then PATH=$(preppath "$i/bin") export JAVA_HOME=$i break; fi done ALL_PATH=.:/usr/local/java/classes:$ORACLE_HOME/jdbc/lib/classes111.zip:/usr/local/java/lib/Tidy.jar NEW_PATH="" for i in ${(s/:/)ALL_PATH} do if test -r "$i" then case "$NEW_PATH" in $i:*|*:$i|*:$i:*) ;; *) if test -z "$NEW_PATH" then NEW_PATH=$i else NEW_PATH=$NEW_PATH:$i fi esac fi done export CLASSPATH=$NEW_PATH for i in /usr/local/tomcat do if [ -d "$i" ] then export CATALINA_HOME="$i" export TOMCAT_HOME="$i" PATH=$(apppath "$i/bin") break; fi done for i in /usr/local/ant do if [ -d "$i" ] then export ANT_HOME="$i" PATH=$(apppath "$i/bin") break; fi done for i in /usr/local/openxchange do if [ -d "$i" ] then export OX_HOME="$i" PATH=$(apppath "$i/bin" "$i/sbin") break; fi done fi