java linux script

#!/bin/sh
#check the to-be-expired client and send mail to notify them
#

#add JAVA_HOME
export JAVA_HOME=/apps/jdk1.5.0_18
export CLASSPATH=$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin

#add send mail variable
export LIB_JARS=/apps/sendNotificationMail/lib
export CONFIG=/apps/sendNotificationMail/Config
export LOG4J_FILE=$CONFIG/log4j.properties
export SEND_MAIL_CLASSPATH=$LIB_JARS/mail.jar:$LIB_JARS/sendMail.jar:$LIB_JARS/ojdbc14.jar:$LIB_JARS/activation.jar:$LIB_JARS/commons-email-1.2.jar:$LIB_JARS/log4j-1.2.8.jar:$CONFIG
echo $SEND_MAIL_CLASSPATH
java -classpath $SEND_MAIL_CLASSPATH -Dlog4j.configuration=file:$LOG4J_FILE -Xms512M -Xmx512M com.prft.dm.mail.Run

你可能感兴趣的:(java,linux,log4j)