把下面代码保存为BAT文件,并放到JBOSS节点中运行。
@echo off
set HOME=%~dp0
set jmx_console=%HOME%\deploy\jmx-console.war
set jbossws_context=%HOME%\deploy\jbossws.sar\jbossws-context.war
set web_console=%HOME%\deploy\management\console-mgr.sar\web-console.war
set root_console=%HOME%\deploy\jboss-web.deployer\ROOT.war
set root_context=%HOME%\deploy\jboss-web.deployer\context.xml
echo %HOME%
for /d %%i in (%jmx_console% %jbossws_context% %web_console% %root_console%) do (
echo delete directory %%i
@rd /s /q "%%i"
)
del /q "%root_context%"
pause