现在的位置: 首页 > 综合 > 正文

像CMD中传递参数 带空格

2018年05月26日 ⁄ 综合 ⁄ 共 325字 ⁄ 字号 评论关闭

@echo off
echo -------------set system variable-----------------

set JAVA_HOME=%~1\Java\jdk
set CATALINA_HOME=%~2\tomcat
echo ----------end of set system variable------------
echo %~2
echo ----register and start tomcat service--------------
call "%~2"\tomcat\bin\service install tomcat

net start tomcat
echo ----end of start tomcat-----------------------------

抱歉!评论已关闭.