实用命令行运行java程序的脚本介绍
@echo off
rem This batch program starts a java application and passes in the commandline arguments
rem set PATH=c:/dev/jdk1.3.1/bin;
set MQ_HOME=C:/Program Files/MQSeries
set PATH=%MQ_HOME%/bin;%PATH%
set JP=../../../../lib
set cp=../../../classes
set cp=%cp%;%JP%/fixUniversalServer.jar
set cp=%cp%;%JP%/fixCore.jar
set cp=%cp%;%JP%/fixMQAdapter.jar
set cp=%cp%;%MQ_HOME%/java/lib/com.ibm.mq.jar
rem The following jars are necessary for running with MQ 5.2 and 5.3
set cp=%cp%;%MQ_HOME%/java/lib/connector.jar
set cp=%cp%;%MQ_HOME%/java/lib/jta.jar
java -version
@echo on
java -mx256M "-Djava.library.path=%MQ_HOME%/java/lib;%JP%/fixMQAdapter.jar" -classpath "%cp%" %*
pause
exit
本文地址:http://www.45fan.com/dnjc/70605.html