@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-----------------------------