执行bat文件并返回提示

时间:2010-05-18 08:34:23

标签: ant batch-file cmd cruisecontrol wowza

我遇到了cruisecontrol的问题,其中一个ant脚本执行的bat文件没有给我回复提示。因此,巡航控制项目一直在继续建设,直到我重新启动巡航控制。我该如何解决这个问题?

这是我正在执行的wowza(Streaming Server)的startup.bat:

@echo off

call setenv.bat

if not %WMSENVOK% == "true" goto end

set _WINDOWNAME="Wowza Media Server 2"
set _EXESERVER=
if "%1"=="newwindow" (
set _EXESERVER=start %_WINDOWNAME%
shift
)

set CLASSPATH="%WMSAPP_HOME%\bin\wms-bootstrap.jar"

rem cacls jmxremote.password /P username:R
rem cacls jmxremote.access /P username:R

rem NOTE: Here you can configure the JVM's built in JMX interface.
rem See the "Server Management Console and Monitoring" chapter
rem of the "User's Guide" for more information on how to configure the
rem remote JMX interface in the [install-dir]/conf/Server.xml file.

set JMXOPTIONS=-Dcom.sun.management.jmxremote=true
rem set JMXOPTIONS=%JMXOPTIONS% 
    -Djava.rmi.server.hostname=192.168.1.7
rem set JMXOPTIONS=%JMXOPTIONS% 
    -Dcom.sun.management.jmxremote.port=1099
rem set JMXOPTIONS=%JMXOPTIONS% 
    -Dcom.sun.management.jmxremote.authenticate=false
rem set JMXOPTIONS=%JMXOPTIONS% 
    -Dcom.sun.management.jmxremote.ssl=false
rem set JMXOPTIONS=%JMXOPTIONS% 
    -Dcom.sun.management.jmxremote.password.file=
       "%WMSCONFIG_HOME%/conf/jmxremote.password"
rem set JMXOPTIONS=%JMXOPTIONS% -Dcom.sun.management.jmxremote.access.file=
       "%WMSCONFIG_HOME%/conf/jmxremote.access"

rem log interceptor com.wowza.wms.logging.LogNotify 
    - see Javadocs for ILogNotify

%_EXESERVER% "%_EXECJAVA%" %JAVA_OPTS% %JMXOPTIONS% 
-Dcom.wowza.wms.AppHome="%WMSAPP_HOME%" 
-Dcom.wowza.wms.ConfigURL="%WMSCONFIG_URL%" 
-Dcom.wowza.wms.ConfigHome="%WMSCONFIG_HOME%" 
-cp %CLASSPATH% com.wowza.wms.bootstrap.Bootstrap start

:end

1 个答案:

答案 0 :(得分:1)

从第一眼看,似乎向服务器启动的行添加start命令可能会有所帮助,即:

start "" %_EXESERVER% "%_EXECJAVA%" %JAVA_OPTS% %JMXOPTIONS% 
-Dcom.wowza.wms.AppHome="%WMSAPP_HOME%" 
-Dcom.wowza.wms.ConfigURL="%WMSCONFIG_URL%" 
-Dcom.wowza.wms.ConfigHome="%WMSCONFIG_HOME%" 
-cp %CLASSPATH% com.wowza.wms.bootstrap.Bootstrap start