BAT文件:
@echo off set CLASSPATH_BAK=%CLASSPATH% set classpath=%CLASSPATH%;.\lib\commons-codec-1.3.jar;.\lib\commons-httpclient-3.0.jar;.\lib\commons-logging-1.0.4.jar;.\lib\dom4j-1.6.1.jar;.\lib\httpcore-4.0.jar;.\lib\jaxen-1.1-beta-9.jar;.\lib\log4j-1.2.14.jar;.\lib\mail.jar;.\lib\activation.jar;abc.jar start javaw com.abc.Main set classpath=%CLASSPATH_BAK%
SH文件:
#!/bin/sh export PATH=/opt/ibm/java-x86_64-60/bin:$PATH export JAVA_HOME=/opt/ibm/java-x86_64-60 export JRE_HOME=/opt/ibm/java-x86_64-60/jre export CLASSPATH=/opt/ibm/java-x86_64-60/lib:/opt/ibm/java-x86_64-60/jre/lib:$CLASSPATH RUN_HOME=/root/rttsTest CLASSPATH=$CLASSPATH$RUN_HOME/lib/commons-codec-1.3.jar CLASSPATH=$CLASSPATH:$RUN_HOME/lib/commons-httpclient-3.0.jar CLASSPATH=$CLASSPATH:$RUN_HOME/lib/commons-logging-1.0.4.jar CLASSPATH=$CLASSPATH:$RUN_HOME/lib/dom4j-1.6.1.jar CLASSPATH=$CLASSPATH:$RUN_HOME/lib/httpcore-4.0.jar CLASSPATH=$CLASSPATH:$RUN_HOME/lib/jaxen-1.1-beta-9.jar CLASSPATH=$CLASSPATH:$RUN_HOME/lib/log4j-1.2.14.jar CLASSPATH=$CLASSPATH:$RUN_HOME/lib/mail.jar CLASSPATH=$CLASSPATH:$RUN_HOME/lib/activation.jar CLASSPATH=$CLASSPATH:$RUN_HOME/abc.jar export CLASSPATH=$CLASSPATH javaw com.abc.Main
本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/xiandedanteng/p/3558743.html,如需转载请自行联系原作者