2005-05-23 11:12:18 +02:00
|
|
|
# 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.
|
2004-04-23 22:33:46 +02:00
|
|
|
|
2005-05-23 11:12:18 +02:00
|
|
|
if whence apppath > /dev/null
|
|
|
|
then
|
2006-12-18 17:22:10 +01:00
|
|
|
for i in \
|
2018-09-18 17:06:58 +02:00
|
|
|
/usr/local/jdk-10.0.1 \
|
2016-11-22 21:31:49 +01:00
|
|
|
/usr/local/jdk1.8.0_112 \
|
2005-05-30 16:20:51 +02:00
|
|
|
/usr/local/java \
|
|
|
|
/usr/lib/java
|
2005-05-23 11:12:18 +02:00
|
|
|
do
|
|
|
|
if [ -d "$i/bin" ]
|
2004-04-23 22:33:46 +02:00
|
|
|
then
|
2016-11-22 21:31:49 +01:00
|
|
|
PATH=$(preppath "$i/bin")
|
2005-05-23 11:12:18 +02:00
|
|
|
export JAVA_HOME=$i
|
|
|
|
break;
|
2004-04-23 22:33:46 +02:00
|
|
|
fi
|
2005-05-23 11:12:18 +02:00
|
|
|
done
|
2004-04-23 22:33:46 +02:00
|
|
|
|
2016-11-22 21:36:07 +01:00
|
|
|
ALL_PATH=.:/usr/local/java/classes:$ORACLE_HOME/jdbc/lib/classes111.zip:/usr/local/java/lib/Tidy.jar
|
2005-05-23 11:12:18 +02:00
|
|
|
NEW_PATH=""
|
2004-04-23 22:33:46 +02:00
|
|
|
|
2005-05-23 11:12:18 +02:00
|
|
|
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
|
2005-05-23 11:04:32 +02:00
|
|
|
|
2005-05-23 11:12:18 +02:00
|
|
|
export CLASSPATH=$NEW_PATH
|
2005-05-23 11:04:32 +02:00
|
|
|
|
2005-05-23 11:12:18 +02:00
|
|
|
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
|