📄 openjms.bat
字号:
@echo offrem ---------------------------------------------------------------------------rem Start/Stop Script for the OpenJMS Serverremrem Required Environment Variablesremrem JAVA_HOME Points to the Java Development Kit installation.remrem Optional Environment Variablesrem rem OPENJMS_HOME Points to the OpenJMS installation directory.remrem JAVA_OPTS Java runtime options used when the "run", "start", orrem "stop" command is executed.remrem JSSE_HOME Points to the Java Secure Sockets Extensionrem (JSSE) installation, whose JAR files will be added to therem system class path used to start OpenJMS.remrem $Id: openjms.bat,v 1.2 2005/06/13 23:10:15 tanderson Exp $rem ---------------------------------------------------------------------------if "%OS%" == "Windows_NT" setlocalif not "%JAVA_HOME%" == "" goto gotJavaHomeecho The JAVA_HOME environment variable is not set.echo This is required to run OpenJMS.exit /B 1:gotJavaHomeif exist "%JAVA_HOME%\bin\java.exe" goto okJavaHomeecho The JAVA_HOME environment variable is not set correctly.echo This is required to run OpenJMS.exit /B 1:okJavaHomeset _RUNJAVA="%JAVA_HOME%\bin\java"rem Guess OPENJMS_HOME if it is not setif not "%OPENJMS_HOME%" == "" goto gotOpenJMSHomeset OPENJMS_HOME=.if exist "%OPENJMS_HOME%\bin\openjms.bat" goto okOpenJMSHomeset OPENJMS_HOME=..if exist "%OPENJMS_HOME%\bin\openjms.bat" goto okOpenJMSHomeecho The OPENJMS_HOME variable is not set.echo This is required to run OpenJMS.exit /B 1:gotOpenJMSHomeif exist "%OPENJMS_HOME%\bin\openjms.bat" goto okOpenJMSHomeecho The OPENJMS_HOME variable is not set correctly.echo This is required to run OpenJMS.exit /B 1:okOpenJMSHomerem Set CLASSPATH to empty by default. User jars can be added via the rem setenv.bat scriptset CLASSPATH=if exist "%OPENJMS_HOME%\bin\setenv.bat" call "%OPENJMS_HOME%\bin\setenv.bat"rem Add on extra jar files to CLASSPATHif "%JSSE_HOME%" == "" goto noJSSEset CLASSPATH=%CLASSPATH%;%JSSE_HOME%\lib\jcert.jar;%JSSE_HOME%\lib\jnet.jar;%JSSE_HOME%\lib\jsse.jar:noJSSEset CLASSPATH=%CLASSPATH%;%OPENJMS_HOME%\lib\@OPENJMS@;%OPENJMS_HOME%\lib\@OPENJMS_TOOLS@set POLICY_FILE=%OPENJMS_HOME%\config\openjms.policyrem Execute the requested commandecho Using OPENJMS_HOME: %OPENJMS_HOME%echo Using JAVA_HOME: %JAVA_HOME%echo Using CLASSPATH: %CLASSPATH%if ""%1"" == ""run"" goto doRunif ""%1"" == ""start"" goto doStartif ""%1"" == ""stop"" goto doStopif ""%1"" == ""admin"" goto doAdminecho usage: openjms.bat (commands)echo commands:echo run Start OpenJMS in the current windowecho start Start OpenJMS in a separate windowecho stop Stop OpenJMSecho admin Start OpenJMS Administratorexit /B 1:doRunshiftset MAINCLASS=org.exolab.jms.server.JmsServerset _EXECJAVA=%_RUNJAVA%goto execCmd:doStartshiftset MAINCLASS=org.exolab.jms.server.JmsServerif not "%OS%" == "Windows_NT" goto noTitleset _EXECJAVA=start "OpenJMS" %_RUNJAVA%goto gotTitle:noTitleset _EXECJAVA=start %_RUNJAVA%:gotTitlegoto execCmd:doStopshiftset MAINCLASS=org.exolab.jms.tools.admin.AdminMgrset ACTION=-stopServerset _EXECJAVA=%_RUNJAVA%goto execCmd:doAdminshiftset MAINCLASS=org.exolab.jms.tools.admin.AdminMgrset _EXECJAVA=%_RUNJAVA%goto execCmd:execCmdrem Get remaining unshifted command line arguments and save them set CMD_LINE_ARGS=:setArgsif ""%1""=="""" goto doneSetArgsset CMD_LINE_ARGS=%CMD_LINE_ARGS% %1shiftgoto setArgs:doneSetArgsrem Execute Java with the applicable properties%_EXECJAVA% %JAVA_OPTS% -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy="%POLICY_FILE%" -Dopenjms.home="%OPENJMS_HOME%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -