首先是在linux下运行脚本的命令
export LANG="zh_CN.UTF-8"
SHEDULE_HOME="/opt/app";
CLASSPATH="$CLASSPATH":"$SHEDULE_HOME"/lib/jsch-0.1.41.jar:"$SHEDULE_HOME"/lib/log4j-1.2.15.jar:"$SHEDULE_HOME"/lib/mysql-connector-java-3.1.12-bin.jar:"$SHEDULE_HOME"/lib/spring.jar:"$SHEDULE_HOME"/lib/commons-logging.jar:"$SHEDULE_HOME":"$SHEDULE_HOME"/.:
exec /usr/java/jdk1.6.0_21/bin/java -classpath "$CLASSPATH" -Xms40m -Xmx512m package_name.ClassName
在Linux下运行java程序(&表示后台运行)
java -classpath .:/home/javapro/lib/* com.xxxx.www.MainForm redis &