start.bat

原创 2015年07月09日 11:14:28

代码

@echo off
rem Licensed to the Apache Software Foundation (ASF) under one or more
rem contributor license agreements.  See the NOTICE file distributed with
rem this work for additional information regarding copyright ownership.
rem The ASF licenses this file to You under the Apache License, Version 2.0
rem (the "License"); you may not use this file except in compliance with
rem the License.  You may obtain a copy of the License at
rem
rem     http://www.apache.org/licenses/LICENSE-2.0
rem
rem Unless required by applicable law or agreed to in writing, software
rem distributed under the License is distributed on an "AS IS" BASIS,
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.

rem ---------------------------------------------------------------------------
rem Start script for the CATALINA Server
rem ---------------------------------------------------------------------------

setlocal

rem Guess CATALINA_HOME if not defined
set "CURRENT_DIR=%cd%"
if not "%CATALINA_HOME%" == "" goto gotHome
set "CATALINA_HOME=%CURRENT_DIR%"
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
cd ..
set "CATALINA_HOME=%cd%"
cd "%CURRENT_DIR%"
:gotHome
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
echo The CATALINA_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
goto end
:okHome

set "EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat"

rem Check that target executable exists
if exist "%EXECUTABLE%" goto okExec
echo Cannot find "%EXECUTABLE%"
echo This file is needed to run this program
goto end
:okExec

rem Get remaining unshifted command line arguments and save them in the
set CMD_LINE_ARGS=
:setArgs
if ""%1""=="""" goto doneSetArgs
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
shift
goto setArgs
:doneSetArgs

call "%EXECUTABLE%" start %CMD_LINE_ARGS%

:end

解析

关闭回显
@echo off

设置本地环境
setlocal

设置CATALINA_HOME的路径位置
rem Guess CATALINA_HOME if not defined

检查catalina.bat文件是否存在
rem Check that target executable exists

获取剩余参数
rem Get remaining unshifted command line arguments and save them in the

调用catalina.bat
call “%EXECUTABLE%” start %CMD_LINE_ARGS%

Start_AVD.bat

  • 2017年01月19日 15:34
  • 116B
  • 下载

ZenTao支持Win8.1(替换start.bat)

  • 2014年09月23日 11:46
  • 1KB
  • 下载

【web服务器】——Tomcat start.bat文件详解

通常情况下,我们配置好了配置文件后,就开始启动start.bat批处理文件,进行tomcat的启动。      那么tomcat是如何一步步启动的呢?我们接下来就来详细介绍一下,tomcat的启动...

start-vc10.0.bat

  • 2013年11月07日 15:37
  • 374B
  • 下载

【系列】char->string类型转换 ||批处理bat之start

C++ 中int,char,string,CString类型转换(一)   1. c++中string到int的转换 1) 在C标准库里面,使用atoi: #include #include ...

探讨start调用纯dos命令

在Win7/Xp系统下也渐渐习惯了用“cmd”操作dos命令,但有时确实因为一些无法使用的但又功能很强大的命令是无法使用的(已经更改了环境变量,所以不是这个问题),很让人头疼。 无意中,看到有人说可...

Java SE 8 Lambda Quick Start 中文版

  • 2017年10月11日 15:16
  • 54KB
  • 下载

Primace_Quick_Start_CN

  • 2016年03月04日 19:08
  • 2.01MB
  • 下载
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:start.bat
举报原因:
原因补充:

(最多只允许输入30个字)