像CMD中传递参数 带空格

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

set JAVA_HOME=%~1Javajdk
set CATALINA_HOME=%~2 omcat
echo ----------end of set system variable------------
echo %~2
echo ----register and start tomcat service--------------
call "%~2" omcatinservice install tomcat

net start tomcat
echo ----end of start tomcat-----------------------------
原文地址:https://www.cnblogs.com/IntelligentBrain/p/5111331.html