tomcat-转载来自http://blog.csdn.net/rentian1/article/details/51208703

TomCat的工作原理和端口理解 
关于解压官网下载:apache-tomcat-6.0.45.zip 
解压后展现目录:

主要关注bin,conf,webapps这三个目录;bin目录里面会有启动的,停止的bat文件,conf主要是tomcat的配置文件,webapps主要是项目的发布文件,在webapps下,tomcat有自己的目录和文件

运行时,调用startup.bat文件:

<code class="hljs vhdl has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;">@echo off
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Licensed <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> the Apache Software Foundation (ASF) under one <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">or</span> more
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> contributor license agreements.  See the NOTICE <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">file</span> distributed <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">with</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> this work <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">for</span> additional information regarding copyright ownership.
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> The ASF licenses this <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">file</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> You under the Apache License, Version <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">2.0</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> (the <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"License"</span>); you may <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">use</span> this <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">file</span> except <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> compliance <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">with</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> the License.  You may obtain a copy <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">of</span> the License at
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>     http://www.apache.org/licenses/LICENSE-<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">2.0</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Unless required by applicable law <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">or</span> agreed <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> writing, software
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> distributed under the License <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> distributed <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">on</span> an <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"AS IS"</span> BASIS,
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> WITHOUT WARRANTIES <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">OR</span> CONDITIONS <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">OF</span> ANY KIND, either express <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">or</span> implied.
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> See the License <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">for</span> the specific language governing permissions <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">and</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> limitations under the License.

<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%OS%"</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"Windows_NT"</span> setlocal
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">---------------------------------------------------------------------------</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Start script <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">for</span> the CATALINA Server
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">---------------------------------------------------------------------------</span>

<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Guess CATALINA_HOME <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> defined
set <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"CURRENT_DIR=%cd%"</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_HOME%"</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto gotHome
set <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"CATALINA_HOME=%CURRENT_DIR%"</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> exist <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_HOME%\bin\catalina.bat"</span> goto okHome
cd ..
set <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"CATALINA_HOME=%cd%"</span>
cd <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CURRENT_DIR%"</span>
:gotHome
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> exist <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_HOME%\bin\catalina.bat"</span> goto okHome
echo The CATALINA_HOME environment <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">variable</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> defined correctly
echo This environment <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">variable</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> needed <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> run this program
goto <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">end</span>
:okHome

set <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat"</span>

<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Check that target executable exists
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> exist <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%EXECUTABLE%"</span> goto okExec
echo Cannot find <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%EXECUTABLE%"</span>
echo This <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">file</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> needed <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> run this program
goto <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">end</span>
:okExec

<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Get remaining unshifted command line arguments <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">and</span> save them <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> the
set CMD_LINE_ARGS=
:setArgs
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span>%<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1</span><span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span>==<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span><span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto doneSetArgs
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1</span>
shift
goto setArgs
:doneSetArgs

call <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%EXECUTABLE%"</span> start %CMD_LINE_ARGS%

:<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">end</span></code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li><li style="box-sizing: border-box; padding: 0px 5px;">6</li><li style="box-sizing: border-box; padding: 0px 5px;">7</li><li style="box-sizing: border-box; padding: 0px 5px;">8</li><li style="box-sizing: border-box; padding: 0px 5px;">9</li><li style="box-sizing: border-box; padding: 0px 5px;">10</li><li style="box-sizing: border-box; padding: 0px 5px;">11</li><li style="box-sizing: border-box; padding: 0px 5px;">12</li><li style="box-sizing: border-box; padding: 0px 5px;">13</li><li style="box-sizing: border-box; padding: 0px 5px;">14</li><li style="box-sizing: border-box; padding: 0px 5px;">15</li><li style="box-sizing: border-box; padding: 0px 5px;">16</li><li style="box-sizing: border-box; padding: 0px 5px;">17</li><li style="box-sizing: border-box; padding: 0px 5px;">18</li><li style="box-sizing: border-box; padding: 0px 5px;">19</li><li style="box-sizing: border-box; padding: 0px 5px;">20</li><li style="box-sizing: border-box; padding: 0px 5px;">21</li><li style="box-sizing: border-box; padding: 0px 5px;">22</li><li style="box-sizing: border-box; padding: 0px 5px;">23</li><li style="box-sizing: border-box; padding: 0px 5px;">24</li><li style="box-sizing: border-box; padding: 0px 5px;">25</li><li style="box-sizing: border-box; padding: 0px 5px;">26</li><li style="box-sizing: border-box; padding: 0px 5px;">27</li><li style="box-sizing: border-box; padding: 0px 5px;">28</li><li style="box-sizing: border-box; padding: 0px 5px;">29</li><li style="box-sizing: border-box; padding: 0px 5px;">30</li><li style="box-sizing: border-box; padding: 0px 5px;">31</li><li style="box-sizing: border-box; padding: 0px 5px;">32</li><li style="box-sizing: border-box; padding: 0px 5px;">33</li><li style="box-sizing: border-box; padding: 0px 5px;">34</li><li style="box-sizing: border-box; padding: 0px 5px;">35</li><li style="box-sizing: border-box; padding: 0px 5px;">36</li><li style="box-sizing: border-box; padding: 0px 5px;">37</li><li style="box-sizing: border-box; padding: 0px 5px;">38</li><li style="box-sizing: border-box; padding: 0px 5px;">39</li><li style="box-sizing: border-box; padding: 0px 5px;">40</li><li style="box-sizing: border-box; padding: 0px 5px;">41</li><li style="box-sizing: border-box; padding: 0px 5px;">42</li><li style="box-sizing: border-box; padding: 0px 5px;">43</li><li style="box-sizing: border-box; padding: 0px 5px;">44</li><li style="box-sizing: border-box; padding: 0px 5px;">45</li><li style="box-sizing: border-box; padding: 0px 5px;">46</li><li style="box-sizing: border-box; padding: 0px 5px;">47</li><li style="box-sizing: border-box; padding: 0px 5px;">48</li><li style="box-sizing: border-box; padding: 0px 5px;">49</li><li style="box-sizing: border-box; padding: 0px 5px;">50</li><li style="box-sizing: border-box; padding: 0px 5px;">51</li><li style="box-sizing: border-box; padding: 0px 5px;">52</li><li style="box-sizing: border-box; padding: 0px 5px;">53</li><li style="box-sizing: border-box; padding: 0px 5px;">54</li><li style="box-sizing: border-box; padding: 0px 5px;">55</li><li style="box-sizing: border-box; padding: 0px 5px;">56</li><li style="box-sizing: border-box; padding: 0px 5px;">57</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li><li style="box-sizing: border-box; padding: 0px 5px;">6</li><li style="box-sizing: border-box; padding: 0px 5px;">7</li><li style="box-sizing: border-box; padding: 0px 5px;">8</li><li style="box-sizing: border-box; padding: 0px 5px;">9</li><li style="box-sizing: border-box; padding: 0px 5px;">10</li><li style="box-sizing: border-box; padding: 0px 5px;">11</li><li style="box-sizing: border-box; padding: 0px 5px;">12</li><li style="box-sizing: border-box; padding: 0px 5px;">13</li><li style="box-sizing: border-box; padding: 0px 5px;">14</li><li style="box-sizing: border-box; padding: 0px 5px;">15</li><li style="box-sizing: border-box; padding: 0px 5px;">16</li><li style="box-sizing: border-box; padding: 0px 5px;">17</li><li style="box-sizing: border-box; padding: 0px 5px;">18</li><li style="box-sizing: border-box; padding: 0px 5px;">19</li><li style="box-sizing: border-box; padding: 0px 5px;">20</li><li style="box-sizing: border-box; padding: 0px 5px;">21</li><li style="box-sizing: border-box; padding: 0px 5px;">22</li><li style="box-sizing: border-box; padding: 0px 5px;">23</li><li style="box-sizing: border-box; padding: 0px 5px;">24</li><li style="box-sizing: border-box; padding: 0px 5px;">25</li><li style="box-sizing: border-box; padding: 0px 5px;">26</li><li style="box-sizing: border-box; padding: 0px 5px;">27</li><li style="box-sizing: border-box; padding: 0px 5px;">28</li><li style="box-sizing: border-box; padding: 0px 5px;">29</li><li style="box-sizing: border-box; padding: 0px 5px;">30</li><li style="box-sizing: border-box; padding: 0px 5px;">31</li><li style="box-sizing: border-box; padding: 0px 5px;">32</li><li style="box-sizing: border-box; padding: 0px 5px;">33</li><li style="box-sizing: border-box; padding: 0px 5px;">34</li><li style="box-sizing: border-box; padding: 0px 5px;">35</li><li style="box-sizing: border-box; padding: 0px 5px;">36</li><li style="box-sizing: border-box; padding: 0px 5px;">37</li><li style="box-sizing: border-box; padding: 0px 5px;">38</li><li style="box-sizing: border-box; padding: 0px 5px;">39</li><li style="box-sizing: border-box; padding: 0px 5px;">40</li><li style="box-sizing: border-box; padding: 0px 5px;">41</li><li style="box-sizing: border-box; padding: 0px 5px;">42</li><li style="box-sizing: border-box; padding: 0px 5px;">43</li><li style="box-sizing: border-box; padding: 0px 5px;">44</li><li style="box-sizing: border-box; padding: 0px 5px;">45</li><li style="box-sizing: border-box; padding: 0px 5px;">46</li><li style="box-sizing: border-box; padding: 0px 5px;">47</li><li style="box-sizing: border-box; padding: 0px 5px;">48</li><li style="box-sizing: border-box; padding: 0px 5px;">49</li><li style="box-sizing: border-box; padding: 0px 5px;">50</li><li style="box-sizing: border-box; padding: 0px 5px;">51</li><li style="box-sizing: border-box; padding: 0px 5px;">52</li><li style="box-sizing: border-box; padding: 0px 5px;">53</li><li style="box-sizing: border-box; padding: 0px 5px;">54</li><li style="box-sizing: border-box; padding: 0px 5px;">55</li><li style="box-sizing: border-box; padding: 0px 5px;">56</li><li style="box-sizing: border-box; padding: 0px 5px;">57</li></ul>

① 首先会根据web.xml文件提供的顺序穿件一个Catalina的servlet容器调用自己带的监听器,会监听程序的运行: 
② 寻找CATALINA_HOME这个tomcat的环境变量,因为现在版本的tomcat放在一个叫Catalina的容器里,以前的tomcat的环境变量为TOMCAT_HOME,如果没有就将当前目录赋予为CATALINA_HOME这个目录,然后执行设置该目录为他运行的根目录 
③ 在根目录下寻找catalina.bat文件并通过JAVA_HOME和JRE_HOME连接上JVM,该文件里面内容如下:

<code class="hljs vhdl has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;">@echo off
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Licensed <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> the Apache Software Foundation (ASF) under one <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">or</span> more
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> contributor license agreements.  See the NOTICE <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">file</span> distributed <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">with</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> this work <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">for</span> additional information regarding copyright ownership.
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> The ASF licenses this <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">file</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> You under the Apache License, Version <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">2.0</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> (the <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"License"</span>); you may <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">use</span> this <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">file</span> except <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> compliance <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">with</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> the License.  You may obtain a copy <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">of</span> the License at
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>     http://www.apache.org/licenses/LICENSE-<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">2.0</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Unless required by applicable law <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">or</span> agreed <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> writing, software
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> distributed under the License <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> distributed <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">on</span> an <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"AS IS"</span> BASIS,
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> WITHOUT WARRANTIES <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">OR</span> CONDITIONS <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">OF</span> ANY KIND, either express <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">or</span> implied.
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> See the License <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">for</span> the specific language governing permissions <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">and</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> limitations under the License.

<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%OS%"</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"Windows_NT"</span> setlocal
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">---------------------------------------------------------------------------</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Start/Stop Script <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">for</span> the CATALINA Server
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Environment <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">Variable</span> Prerequisites
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>   CATALINA_HOME   May point at your Catalina <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"build"</span> directory.
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>   CATALINA_BASE   (Optional) Base directory <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">for</span> resolving dynamic portions
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">of</span> a Catalina installation.  <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">If</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> present, resolves <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   the same directory that CATALINA_HOME points <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span>.
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>   CATALINA_OPTS   (Optional) Java runtime options used <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">when</span> the <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"start"</span>,
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">or</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"run"</span> command <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> executed.
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>   CATALINA_TMPDIR (Optional) Directory path location <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">of</span> temporary directory
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   the JVM should <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">use</span> (java.io.tmpdir).  Defaults <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   %CATALINA_BASE%\temp.
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>   JAVA_HOME       Must point at your Java Development Kit installation.
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   Required <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> run the <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">with</span> the <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"debug"</span> argument.
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>   JRE_HOME        Must point at your Java Runtime installation.
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   Defaults <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> JAVA_HOME <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> empty.
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>   JAVA_OPTS       (Optional) Java runtime options used <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">when</span> the <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"start"</span>,
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"stop"</span>, <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">or</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"run"</span> command <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> executed.
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>   JAVA_ENDORSED_DIRS (Optional) Lists <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">of</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">of</span> semi-colon separated directories
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   containing some jars <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> order <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> allow replacement <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">of</span> APIs 
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   created outside <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">of</span> the JCP (i.e. DOM <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">and</span> SAX from W3C). 
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   It can also be used <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> update the XML parser implementation.
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   Defaults <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> $CATALINA_HOME/endorsed.
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>   JPDA_TRANSPORT  (Optional) JPDA <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">transport</span> used <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">when</span> the <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"jpda start"</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   command <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> executed. The <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">default</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"dt_socket"</span>.
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>   JPDA_ADDRESS    (Optional) Java runtime options used <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">when</span> the <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"jpda start"</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   command <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> executed. The <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">default</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">8000.</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>   JPDA_SUSPEND    (Optional) Java runtime options used <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">when</span> the <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"jpda start"</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   command <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> executed. Specifies whether JVM should suspend
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   execution immediately <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">after</span> startup. <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">Default</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"n"</span>.
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>   JPDA_OPTS       (Optional) Java runtime options used <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">when</span> the <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"jpda start"</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   command <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> executed. <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">If</span> used, JPDA_TRANSPORT, JPDA_ADDRESS,
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">and</span> JPDA_SUSPEND are ignored. Thus, <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">all</span> required jpda
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   options MUST be specified. The <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">default</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span>:
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   -agentlib:jdwp=<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">transport</span>=%JPDA_TRANSPORT%,
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                       address=%JPDA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND%
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>   LOGGING_CONFIG  (Optional) Override Tomcat<span class="hljs-attribute" style="box-sizing: border-box;">'s</span> logging config <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">file</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   Example (<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">all</span> one line)
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   set LOGGING_CONFIG=<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties"</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>   LOGGING_MANAGER (Optional) Override Tomcat<span class="hljs-attribute" style="box-sizing: border-box;">'s</span> logging manager 
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   Example (<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">all</span> one line)
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   set LOGGING_MANAGER=<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>   TITLE           (Optional) Specify the title <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">of</span> Tomcat window. The <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">default</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   TITLE <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> Tomcat <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> it<span class="hljs-attribute" style="box-sizing: border-box;">'s</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> specified.
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   Example (<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">all</span> one line)
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>                   set TITLE=Tomcat.Cluster#<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1.</span>Server#<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1</span> [%DATE% %<span class="hljs-typename" style="color: rgb(102, 0, 102); box-sizing: border-box;">TIME</span>%]
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">---------------------------------------------------------------------------</span>

<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Guess CATALINA_HOME <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> defined
set <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"CURRENT_DIR=%cd%"</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_HOME%"</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto gotHome
set <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"CATALINA_HOME=%CURRENT_DIR%"</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> exist <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_HOME%\bin\catalina.bat"</span> goto okHome
cd ..
set <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"CATALINA_HOME=%cd%"</span>
cd <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CURRENT_DIR%"</span>
:gotHome
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> exist <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_HOME%\bin\catalina.bat"</span> goto okHome
echo The CATALINA_HOME environment <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">variable</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> defined correctly
echo This environment <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">variable</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> needed <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> run this program
goto <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">end</span>
:okHome

<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Copy CATALINA_BASE from CATALINA_HOME <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> defined
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_BASE%"</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto gotBase
set <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"CATALINA_BASE=%CATALINA_HOME%"</span>
:gotBase

<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Ensure that any user defined CLASSPATH variables are <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> used <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">on</span> startup,
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> but allow them <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> be specified <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> setenv.bat, <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> rare <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">case</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">when</span> it <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> needed.
set CLASSPATH=

<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Get standard environment variables
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> exist <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_BASE%\bin\setenv.bat"</span> goto checkSetenvHome
call <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_BASE%\bin\setenv.bat"</span>
goto setenvDone
:checkSetenvHome
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> exist <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_HOME%\bin\setenv.bat"</span> call <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_HOME%\bin\setenv.bat"</span>
:setenvDone

<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Get standard Java environment variables
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> exist <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_HOME%\bin\setclasspath.bat"</span> goto okSetclasspath
echo Cannot find <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_HOME%\bin\setclasspath.bat"</span>
echo This <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">file</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> needed <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> run this program
goto <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">end</span>
:okSetclasspath
set <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"BASEDIR=%CATALINA_HOME%"</span>
call <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_HOME%\bin\setclasspath.bat"</span> %<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> errorlevel <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1</span> goto <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">end</span>

<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_TMPDIR%"</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto gotTmpdir
set <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"CATALINA_TMPDIR=%CATALINA_BASE%\temp"</span>
:gotTmpdir

<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Add tomcat-juli.jar <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">and</span> bootstrap.jar <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> classpath
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> tomcat-juli.jar can be over-ridden per instance
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Note that there are no quotes as we do <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> want <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> introduce random
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> quotes into the CLASSPATH
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CLASSPATH%"</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto emptyClasspath
set <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"CLASSPATH=%CLASSPATH%;"</span>
:emptyClasspath
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_BASE%"</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_HOME%"</span> goto juliClasspathHome
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> exist <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_BASE%\bin\tomcat-juli.jar"</span> goto juliClasspathHome
set <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"CLASSPATH=%CLASSPATH%%CATALINA_BASE%\bin\tomcat-juli.jar;%CATALINA_HOME%\bin\bootstrap.jar"</span>
goto juliClasspathDone
:juliClasspathHome
set <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"CLASSPATH=%CLASSPATH%%CATALINA_HOME%\bin\bootstrap.jar"</span>
:juliClasspathDone

<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%LOGGING_CONFIG%"</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto noJuliConfig
set LOGGING_CONFIG=-Dnop
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> exist <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_BASE%\conf\logging.properties"</span> goto noJuliConfig
set LOGGING_CONFIG=-Djava.util.logging.config.<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">file</span>=<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_BASE%\conf\logging.properties"</span>
:noJuliConfig
set JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%

<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%LOGGING_MANAGER%"</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto noJuliManager
set LOGGING_MANAGER=-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
:noJuliManager
set JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER%

<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">----- Execute The Requested Command ---------------------------------------</span>

echo Using CATALINA_BASE:   <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_BASE%"</span>
echo Using CATALINA_HOME:   <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_HOME%"</span>
echo Using CATALINA_TMPDIR: <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_TMPDIR%"</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span>%<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1</span><span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span>debug<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto use_jdk
echo Using JRE_HOME:        <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%JRE_HOME%"</span>
goto java_dir_displayed
:use_jdk
echo Using JAVA_HOME:       <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%JAVA_HOME%"</span>
:java_dir_displayed
echo Using CLASSPATH:       <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CLASSPATH%"</span>

set _EXECJAVA=%_RUNJAVA%
set MAINCLASS=org.apache.catalina.startup.Bootstrap
set ACTION=start
set SECURITY_POLICY_FILE=
set DEBUG_OPTS=
set JPDA=

<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span>%<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1</span><span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span>jpda<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto noJpda
set JPDA=jpda
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%JPDA_TRANSPORT%"</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto gotJpdaTransport
set JPDA_TRANSPORT=dt_socket
:gotJpdaTransport
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%JPDA_ADDRESS%"</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto gotJpdaAddress
set JPDA_ADDRESS=<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">8000</span>
:gotJpdaAddress
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%JPDA_SUSPEND%"</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto gotJpdaSuspend
set JPDA_SUSPEND=n
:gotJpdaSuspend
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%JPDA_OPTS%"</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto gotJpdaOpts
set JPDA_OPTS=-agentlib:jdwp=<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">transport</span>=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND%
:gotJpdaOpts
shift
:noJpda

<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span>%<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1</span><span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span>debug<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto doDebug
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span>%<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1</span><span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span>run<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto doRun
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span>%<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1</span><span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span>start<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto doStart
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span>%<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1</span><span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span>stop<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto doStop
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span>%<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1</span><span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span>version<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto doVersion

echo Usage:  catalina ( commands ... )
echo commands:
echo   debug             Start Catalina <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> a debugger
echo   debug -security   Debug Catalina <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">with</span> a security manager
echo   jpda start        Start Catalina under JPDA debugger
echo   run               Start Catalina <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> the current window
echo   run -security     Start <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> the current window <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">with</span> security manager
echo   start             Start Catalina <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> a separate window
echo   start -security   Start <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> a separate window <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">with</span> security manager
echo   stop              Stop Catalina
echo   version           What version <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">of</span> tomcat are you running?
goto <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">end</span>

:doDebug
shift
set _EXECJAVA=%_RUNJDB%
set DEBUG_OPTS=-sourcepath <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_HOME%\..\..\java"</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span>%<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1</span><span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span>-security<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto execCmd
shift
echo Using Security Manager
set <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy"</span>
goto execCmd

:doRun
shift
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span>%<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1</span><span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span>-security<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto execCmd
shift
echo Using Security Manager
set <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy"</span>
goto execCmd

:doStart
shift
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%OS%"</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"Windows_NT"</span> goto noTitle
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%TITLE%"</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> set TITLE=Tomcat
set _EXECJAVA=start <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%TITLE%"</span> %_RUNJAVA%
goto gotTitle
:noTitle
set _EXECJAVA=start %_RUNJAVA%
:gotTitle
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span>%<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1</span><span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span>-security<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto execCmd
shift
echo Using Security Manager
set <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy"</span>
goto execCmd

:doStop
shift
set ACTION=stop
set CATALINA_OPTS=
goto execCmd

:doVersion
%_EXECJAVA% -classpath <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_HOME%\lib\catalina.jar"</span> org.apache.catalina.util.ServerInfo
goto <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">end</span>


:execCmd
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Get remaining unshifted command line arguments <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">and</span> save them <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> the
set CMD_LINE_ARGS=
:setArgs
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span>%<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1</span><span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span>==<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span><span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto doneSetArgs
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1</span>
shift
goto setArgs
:doneSetArgs

<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Execute Java <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">with</span> the applicable properties
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%JPDA%"</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto doJpda
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%SECURITY_POLICY_FILE%"</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto doSecurity
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs=<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%JAVA_ENDORSED_DIRS%"</span> -classpath <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CLASSPATH%"</span> -Dcatalina.base=<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_BASE%"</span> -Dcatalina.home=<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_HOME%"</span> -Djava.io.tmpdir=<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_TMPDIR%"</span> %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">end</span>
:doSecurity
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs=<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%JAVA_ENDORSED_DIRS%"</span> -classpath <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CLASSPATH%"</span> -Djava.security.manager -Djava.security.policy==<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%SECURITY_POLICY_FILE%"</span> -Dcatalina.base=<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_BASE%"</span> -Dcatalina.home=<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_HOME%"</span> -Djava.io.tmpdir=<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_TMPDIR%"</span> %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">end</span>
:doJpda
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%SECURITY_POLICY_FILE%"</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto doSecurityJpda
%_EXECJAVA% %JAVA_OPTS% %JPDA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs=<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%JAVA_ENDORSED_DIRS%"</span> -classpath <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CLASSPATH%"</span> -Dcatalina.base=<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_BASE%"</span> -Dcatalina.home=<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_HOME%"</span> -Djava.io.tmpdir=<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_TMPDIR%"</span> %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">end</span>
:doSecurityJpda
%_EXECJAVA% %JAVA_OPTS% %JPDA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs=<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%JAVA_ENDORSED_DIRS%"</span> -classpath <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CLASSPATH%"</span> -Djava.security.manager -Djava.security.policy==<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%SECURITY_POLICY_FILE%"</span> -Dcatalina.base=<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_BASE%"</span> -Dcatalina.home=<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_HOME%"</span> -Djava.io.tmpdir=<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%CATALINA_TMPDIR%"</span> %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">end</span>

:<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">end</span></code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li><li style="box-sizing: border-box; padding: 0px 5px;">6</li><li style="box-sizing: border-box; padding: 0px 5px;">7</li><li style="box-sizing: border-box; padding: 0px 5px;">8</li><li style="box-sizing: border-box; padding: 0px 5px;">9</li><li style="box-sizing: border-box; padding: 0px 5px;">10</li><li style="box-sizing: border-box; padding: 0px 5px;">11</li><li style="box-sizing: border-box; padding: 0px 5px;">12</li><li style="box-sizing: border-box; padding: 0px 5px;">13</li><li style="box-sizing: border-box; padding: 0px 5px;">14</li><li style="box-sizing: border-box; padding: 0px 5px;">15</li><li style="box-sizing: border-box; padding: 0px 5px;">16</li><li style="box-sizing: border-box; padding: 0px 5px;">17</li><li style="box-sizing: border-box; padding: 0px 5px;">18</li><li style="box-sizing: border-box; padding: 0px 5px;">19</li><li style="box-sizing: border-box; padding: 0px 5px;">20</li><li style="box-sizing: border-box; padding: 0px 5px;">21</li><li style="box-sizing: border-box; padding: 0px 5px;">22</li><li style="box-sizing: border-box; padding: 0px 5px;">23</li><li style="box-sizing: border-box; padding: 0px 5px;">24</li><li style="box-sizing: border-box; padding: 0px 5px;">25</li><li style="box-sizing: border-box; padding: 0px 5px;">26</li><li style="box-sizing: border-box; padding: 0px 5px;">27</li><li style="box-sizing: border-box; padding: 0px 5px;">28</li><li style="box-sizing: border-box; padding: 0px 5px;">29</li><li style="box-sizing: border-box; padding: 0px 5px;">30</li><li style="box-sizing: border-box; padding: 0px 5px;">31</li><li style="box-sizing: border-box; padding: 0px 5px;">32</li><li style="box-sizing: border-box; padding: 0px 5px;">33</li><li style="box-sizing: border-box; padding: 0px 5px;">34</li><li style="box-sizing: border-box; padding: 0px 5px;">35</li><li style="box-sizing: border-box; padding: 0px 5px;">36</li><li style="box-sizing: border-box; padding: 0px 5px;">37</li><li style="box-sizing: border-box; padding: 0px 5px;">38</li><li style="box-sizing: border-box; padding: 0px 5px;">39</li><li style="box-sizing: border-box; padding: 0px 5px;">40</li><li style="box-sizing: border-box; padding: 0px 5px;">41</li><li style="box-sizing: border-box; padding: 0px 5px;">42</li><li style="box-sizing: border-box; padding: 0px 5px;">43</li><li style="box-sizing: border-box; padding: 0px 5px;">44</li><li style="box-sizing: border-box; padding: 0px 5px;">45</li><li style="box-sizing: border-box; padding: 0px 5px;">46</li><li style="box-sizing: border-box; padding: 0px 5px;">47</li><li style="box-sizing: border-box; padding: 0px 5px;">48</li><li style="box-sizing: border-box; padding: 0px 5px;">49</li><li style="box-sizing: border-box; padding: 0px 5px;">50</li><li style="box-sizing: border-box; padding: 0px 5px;">51</li><li style="box-sizing: border-box; padding: 0px 5px;">52</li><li style="box-sizing: border-box; padding: 0px 5px;">53</li><li style="box-sizing: border-box; padding: 0px 5px;">54</li><li style="box-sizing: border-box; padding: 0px 5px;">55</li><li style="box-sizing: border-box; padding: 0px 5px;">56</li><li style="box-sizing: border-box; padding: 0px 5px;">57</li><li style="box-sizing: border-box; padding: 0px 5px;">58</li><li style="box-sizing: border-box; padding: 0px 5px;">59</li><li style="box-sizing: border-box; padding: 0px 5px;">60</li><li style="box-sizing: border-box; padding: 0px 5px;">61</li><li style="box-sizing: border-box; padding: 0px 5px;">62</li><li style="box-sizing: border-box; padding: 0px 5px;">63</li><li style="box-sizing: border-box; padding: 0px 5px;">64</li><li style="box-sizing: border-box; padding: 0px 5px;">65</li><li style="box-sizing: border-box; padding: 0px 5px;">66</li><li style="box-sizing: border-box; padding: 0px 5px;">67</li><li style="box-sizing: border-box; padding: 0px 5px;">68</li><li style="box-sizing: border-box; padding: 0px 5px;">69</li><li style="box-sizing: border-box; padding: 0px 5px;">70</li><li style="box-sizing: border-box; padding: 0px 5px;">71</li><li style="box-sizing: border-box; padding: 0px 5px;">72</li><li style="box-sizing: border-box; padding: 0px 5px;">73</li><li style="box-sizing: border-box; padding: 0px 5px;">74</li><li style="box-sizing: border-box; padding: 0px 5px;">75</li><li style="box-sizing: border-box; padding: 0px 5px;">76</li><li style="box-sizing: border-box; padding: 0px 5px;">77</li><li style="box-sizing: border-box; padding: 0px 5px;">78</li><li style="box-sizing: border-box; padding: 0px 5px;">79</li><li style="box-sizing: border-box; padding: 0px 5px;">80</li><li style="box-sizing: border-box; padding: 0px 5px;">81</li><li style="box-sizing: border-box; padding: 0px 5px;">82</li><li style="box-sizing: border-box; padding: 0px 5px;">83</li><li style="box-sizing: border-box; padding: 0px 5px;">84</li><li style="box-sizing: border-box; padding: 0px 5px;">85</li><li style="box-sizing: border-box; padding: 0px 5px;">86</li><li style="box-sizing: border-box; padding: 0px 5px;">87</li><li style="box-sizing: border-box; padding: 0px 5px;">88</li><li style="box-sizing: border-box; padding: 0px 5px;">89</li><li style="box-sizing: border-box; padding: 0px 5px;">90</li><li style="box-sizing: border-box; padding: 0px 5px;">91</li><li style="box-sizing: border-box; padding: 0px 5px;">92</li><li style="box-sizing: border-box; padding: 0px 5px;">93</li><li style="box-sizing: border-box; padding: 0px 5px;">94</li><li style="box-sizing: border-box; padding: 0px 5px;">95</li><li style="box-sizing: border-box; padding: 0px 5px;">96</li><li style="box-sizing: border-box; padding: 0px 5px;">97</li><li style="box-sizing: border-box; padding: 0px 5px;">98</li><li style="box-sizing: border-box; padding: 0px 5px;">99</li><li style="box-sizing: border-box; padding: 0px 5px;">100</li><li style="box-sizing: border-box; padding: 0px 5px;">101</li><li style="box-sizing: border-box; padding: 0px 5px;">102</li><li style="box-sizing: border-box; padding: 0px 5px;">103</li><li style="box-sizing: border-box; padding: 0px 5px;">104</li><li style="box-sizing: border-box; padding: 0px 5px;">105</li><li style="box-sizing: border-box; padding: 0px 5px;">106</li><li style="box-sizing: border-box; padding: 0px 5px;">107</li><li style="box-sizing: border-box; padding: 0px 5px;">108</li><li style="box-sizing: border-box; padding: 0px 5px;">109</li><li style="box-sizing: border-box; padding: 0px 5px;">110</li><li style="box-sizing: border-box; padding: 0px 5px;">111</li><li style="box-sizing: border-box; padding: 0px 5px;">112</li><li style="box-sizing: border-box; padding: 0px 5px;">113</li><li style="box-sizing: border-box; padding: 0px 5px;">114</li><li style="box-sizing: border-box; padding: 0px 5px;">115</li><li style="box-sizing: border-box; padding: 0px 5px;">116</li><li style="box-sizing: border-box; padding: 0px 5px;">117</li><li style="box-sizing: border-box; padding: 0px 5px;">118</li><li style="box-sizing: border-box; padding: 0px 5px;">119</li><li style="box-sizing: border-box; padding: 0px 5px;">120</li><li style="box-sizing: border-box; padding: 0px 5px;">121</li><li style="box-sizing: border-box; padding: 0px 5px;">122</li><li style="box-sizing: border-box; padding: 0px 5px;">123</li><li style="box-sizing: border-box; padding: 0px 5px;">124</li><li style="box-sizing: border-box; padding: 0px 5px;">125</li><li style="box-sizing: border-box; padding: 0px 5px;">126</li><li style="box-sizing: border-box; padding: 0px 5px;">127</li><li style="box-sizing: border-box; padding: 0px 5px;">128</li><li style="box-sizing: border-box; padding: 0px 5px;">129</li><li style="box-sizing: border-box; padding: 0px 5px;">130</li><li style="box-sizing: border-box; padding: 0px 5px;">131</li><li style="box-sizing: border-box; padding: 0px 5px;">132</li><li style="box-sizing: border-box; padding: 0px 5px;">133</li><li style="box-sizing: border-box; padding: 0px 5px;">134</li><li style="box-sizing: border-box; padding: 0px 5px;">135</li><li style="box-sizing: border-box; padding: 0px 5px;">136</li><li style="box-sizing: border-box; padding: 0px 5px;">137</li><li style="box-sizing: border-box; padding: 0px 5px;">138</li><li style="box-sizing: border-box; padding: 0px 5px;">139</li><li style="box-sizing: border-box; padding: 0px 5px;">140</li><li style="box-sizing: border-box; padding: 0px 5px;">141</li><li style="box-sizing: border-box; padding: 0px 5px;">142</li><li style="box-sizing: border-box; padding: 0px 5px;">143</li><li style="box-sizing: border-box; padding: 0px 5px;">144</li><li style="box-sizing: border-box; padding: 0px 5px;">145</li><li style="box-sizing: border-box; padding: 0px 5px;">146</li><li style="box-sizing: border-box; padding: 0px 5px;">147</li><li style="box-sizing: border-box; padding: 0px 5px;">148</li><li style="box-sizing: border-box; padding: 0px 5px;">149</li><li style="box-sizing: border-box; padding: 0px 5px;">150</li><li style="box-sizing: border-box; padding: 0px 5px;">151</li><li style="box-sizing: border-box; padding: 0px 5px;">152</li><li style="box-sizing: border-box; padding: 0px 5px;">153</li><li style="box-sizing: border-box; padding: 0px 5px;">154</li><li style="box-sizing: border-box; padding: 0px 5px;">155</li><li style="box-sizing: border-box; padding: 0px 5px;">156</li><li style="box-sizing: border-box; padding: 0px 5px;">157</li><li style="box-sizing: border-box; padding: 0px 5px;">158</li><li style="box-sizing: border-box; padding: 0px 5px;">159</li><li style="box-sizing: border-box; padding: 0px 5px;">160</li><li style="box-sizing: border-box; padding: 0px 5px;">161</li><li style="box-sizing: border-box; padding: 0px 5px;">162</li><li style="box-sizing: border-box; padding: 0px 5px;">163</li><li style="box-sizing: border-box; padding: 0px 5px;">164</li><li style="box-sizing: border-box; padding: 0px 5px;">165</li><li style="box-sizing: border-box; padding: 0px 5px;">166</li><li style="box-sizing: border-box; padding: 0px 5px;">167</li><li style="box-sizing: border-box; padding: 0px 5px;">168</li><li style="box-sizing: border-box; padding: 0px 5px;">169</li><li style="box-sizing: border-box; padding: 0px 5px;">170</li><li style="box-sizing: border-box; padding: 0px 5px;">171</li><li style="box-sizing: border-box; padding: 0px 5px;">172</li><li style="box-sizing: border-box; padding: 0px 5px;">173</li><li style="box-sizing: border-box; padding: 0px 5px;">174</li><li style="box-sizing: border-box; padding: 0px 5px;">175</li><li style="box-sizing: border-box; padding: 0px 5px;">176</li><li style="box-sizing: border-box; padding: 0px 5px;">177</li><li style="box-sizing: border-box; padding: 0px 5px;">178</li><li style="box-sizing: border-box; padding: 0px 5px;">179</li><li style="box-sizing: border-box; padding: 0px 5px;">180</li><li style="box-sizing: border-box; padding: 0px 5px;">181</li><li style="box-sizing: border-box; padding: 0px 5px;">182</li><li style="box-sizing: border-box; padding: 0px 5px;">183</li><li style="box-sizing: border-box; padding: 0px 5px;">184</li><li style="box-sizing: border-box; padding: 0px 5px;">185</li><li style="box-sizing: border-box; padding: 0px 5px;">186</li><li style="box-sizing: border-box; padding: 0px 5px;">187</li><li style="box-sizing: border-box; padding: 0px 5px;">188</li><li style="box-sizing: border-box; padding: 0px 5px;">189</li><li style="box-sizing: border-box; padding: 0px 5px;">190</li><li style="box-sizing: border-box; padding: 0px 5px;">191</li><li style="box-sizing: border-box; padding: 0px 5px;">192</li><li style="box-sizing: border-box; padding: 0px 5px;">193</li><li style="box-sizing: border-box; padding: 0px 5px;">194</li><li style="box-sizing: border-box; padding: 0px 5px;">195</li><li style="box-sizing: border-box; padding: 0px 5px;">196</li><li style="box-sizing: border-box; padding: 0px 5px;">197</li><li style="box-sizing: border-box; padding: 0px 5px;">198</li><li style="box-sizing: border-box; padding: 0px 5px;">199</li><li style="box-sizing: border-box; padding: 0px 5px;">200</li><li style="box-sizing: border-box; padding: 0px 5px;">201</li><li style="box-sizing: border-box; padding: 0px 5px;">202</li><li style="box-sizing: border-box; padding: 0px 5px;">203</li><li style="box-sizing: border-box; padding: 0px 5px;">204</li><li style="box-sizing: border-box; padding: 0px 5px;">205</li><li style="box-sizing: border-box; padding: 0px 5px;">206</li><li style="box-sizing: border-box; padding: 0px 5px;">207</li><li style="box-sizing: border-box; padding: 0px 5px;">208</li><li style="box-sizing: border-box; padding: 0px 5px;">209</li><li style="box-sizing: border-box; padding: 0px 5px;">210</li><li style="box-sizing: border-box; padding: 0px 5px;">211</li><li style="box-sizing: border-box; padding: 0px 5px;">212</li><li style="box-sizing: border-box; padding: 0px 5px;">213</li><li style="box-sizing: border-box; padding: 0px 5px;">214</li><li style="box-sizing: border-box; padding: 0px 5px;">215</li><li style="box-sizing: border-box; padding: 0px 5px;">216</li><li style="box-sizing: border-box; padding: 0px 5px;">217</li><li style="box-sizing: border-box; padding: 0px 5px;">218</li><li style="box-sizing: border-box; padding: 0px 5px;">219</li><li style="box-sizing: border-box; padding: 0px 5px;">220</li><li style="box-sizing: border-box; padding: 0px 5px;">221</li><li style="box-sizing: border-box; padding: 0px 5px;">222</li><li style="box-sizing: border-box; padding: 0px 5px;">223</li><li style="box-sizing: border-box; padding: 0px 5px;">224</li><li style="box-sizing: border-box; padding: 0px 5px;">225</li><li style="box-sizing: border-box; padding: 0px 5px;">226</li><li style="box-sizing: border-box; padding: 0px 5px;">227</li><li style="box-sizing: border-box; padding: 0px 5px;">228</li><li style="box-sizing: border-box; padding: 0px 5px;">229</li><li style="box-sizing: border-box; padding: 0px 5px;">230</li><li style="box-sizing: border-box; padding: 0px 5px;">231</li><li style="box-sizing: border-box; padding: 0px 5px;">232</li><li style="box-sizing: border-box; padding: 0px 5px;">233</li><li style="box-sizing: border-box; padding: 0px 5px;">234</li><li style="box-sizing: border-box; padding: 0px 5px;">235</li><li style="box-sizing: border-box; padding: 0px 5px;">236</li><li style="box-sizing: border-box; padding: 0px 5px;">237</li><li style="box-sizing: border-box; padding: 0px 5px;">238</li><li style="box-sizing: border-box; padding: 0px 5px;">239</li><li style="box-sizing: border-box; padding: 0px 5px;">240</li><li style="box-sizing: border-box; padding: 0px 5px;">241</li><li style="box-sizing: border-box; padding: 0px 5px;">242</li><li style="box-sizing: border-box; padding: 0px 5px;">243</li><li style="box-sizing: border-box; padding: 0px 5px;">244</li><li style="box-sizing: border-box; padding: 0px 5px;">245</li><li style="box-sizing: border-box; padding: 0px 5px;">246</li><li style="box-sizing: border-box; padding: 0px 5px;">247</li><li style="box-sizing: border-box; padding: 0px 5px;">248</li><li style="box-sizing: border-box; padding: 0px 5px;">249</li><li style="box-sizing: border-box; padding: 0px 5px;">250</li><li style="box-sizing: border-box; padding: 0px 5px;">251</li><li style="box-sizing: border-box; padding: 0px 5px;">252</li><li style="box-sizing: border-box; padding: 0px 5px;">253</li><li style="box-sizing: border-box; padding: 0px 5px;">254</li><li style="box-sizing: border-box; padding: 0px 5px;">255</li><li style="box-sizing: border-box; padding: 0px 5px;">256</li><li style="box-sizing: border-box; padding: 0px 5px;">257</li><li style="box-sizing: border-box; padding: 0px 5px;">258</li><li style="box-sizing: border-box; padding: 0px 5px;">259</li><li style="box-sizing: border-box; padding: 0px 5px;">260</li><li style="box-sizing: border-box; padding: 0px 5px;">261</li><li style="box-sizing: border-box; padding: 0px 5px;">262</li><li style="box-sizing: border-box; padding: 0px 5px;">263</li><li style="box-sizing: border-box; padding: 0px 5px;">264</li><li style="box-sizing: border-box; padding: 0px 5px;">265</li><li style="box-sizing: border-box; padding: 0px 5px;">266</li><li style="box-sizing: border-box; padding: 0px 5px;">267</li><li style="box-sizing: border-box; padding: 0px 5px;">268</li><li style="box-sizing: border-box; padding: 0px 5px;">269</li><li style="box-sizing: border-box; padding: 0px 5px;">270</li><li style="box-sizing: border-box; padding: 0px 5px;">271</li><li style="box-sizing: border-box; padding: 0px 5px;">272</li><li style="box-sizing: border-box; padding: 0px 5px;">273</li><li style="box-sizing: border-box; padding: 0px 5px;">274</li><li style="box-sizing: border-box; padding: 0px 5px;">275</li><li style="box-sizing: border-box; padding: 0px 5px;">276</li><li style="box-sizing: border-box; padding: 0px 5px;">277</li><li style="box-sizing: border-box; padding: 0px 5px;">278</li><li style="box-sizing: border-box; padding: 0px 5px;">279</li><li style="box-sizing: border-box; padding: 0px 5px;">280</li><li style="box-sizing: border-box; padding: 0px 5px;">281</li><li style="box-sizing: border-box; padding: 0px 5px;">282</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li><li style="box-sizing: border-box; padding: 0px 5px;">6</li><li style="box-sizing: border-box; padding: 0px 5px;">7</li><li style="box-sizing: border-box; padding: 0px 5px;">8</li><li style="box-sizing: border-box; padding: 0px 5px;">9</li><li style="box-sizing: border-box; padding: 0px 5px;">10</li><li style="box-sizing: border-box; padding: 0px 5px;">11</li><li style="box-sizing: border-box; padding: 0px 5px;">12</li><li style="box-sizing: border-box; padding: 0px 5px;">13</li><li style="box-sizing: border-box; padding: 0px 5px;">14</li><li style="box-sizing: border-box; padding: 0px 5px;">15</li><li style="box-sizing: border-box; padding: 0px 5px;">16</li><li style="box-sizing: border-box; padding: 0px 5px;">17</li><li style="box-sizing: border-box; padding: 0px 5px;">18</li><li style="box-sizing: border-box; padding: 0px 5px;">19</li><li style="box-sizing: border-box; padding: 0px 5px;">20</li><li style="box-sizing: border-box; padding: 0px 5px;">21</li><li style="box-sizing: border-box; padding: 0px 5px;">22</li><li style="box-sizing: border-box; padding: 0px 5px;">23</li><li style="box-sizing: border-box; padding: 0px 5px;">24</li><li style="box-sizing: border-box; padding: 0px 5px;">25</li><li style="box-sizing: border-box; padding: 0px 5px;">26</li><li style="box-sizing: border-box; padding: 0px 5px;">27</li><li style="box-sizing: border-box; padding: 0px 5px;">28</li><li style="box-sizing: border-box; padding: 0px 5px;">29</li><li style="box-sizing: border-box; padding: 0px 5px;">30</li><li style="box-sizing: border-box; padding: 0px 5px;">31</li><li style="box-sizing: border-box; padding: 0px 5px;">32</li><li style="box-sizing: border-box; padding: 0px 5px;">33</li><li style="box-sizing: border-box; padding: 0px 5px;">34</li><li style="box-sizing: border-box; padding: 0px 5px;">35</li><li style="box-sizing: border-box; padding: 0px 5px;">36</li><li style="box-sizing: border-box; padding: 0px 5px;">37</li><li style="box-sizing: border-box; padding: 0px 5px;">38</li><li style="box-sizing: border-box; padding: 0px 5px;">39</li><li style="box-sizing: border-box; padding: 0px 5px;">40</li><li style="box-sizing: border-box; padding: 0px 5px;">41</li><li style="box-sizing: border-box; padding: 0px 5px;">42</li><li style="box-sizing: border-box; padding: 0px 5px;">43</li><li style="box-sizing: border-box; padding: 0px 5px;">44</li><li style="box-sizing: border-box; padding: 0px 5px;">45</li><li style="box-sizing: border-box; padding: 0px 5px;">46</li><li style="box-sizing: border-box; padding: 0px 5px;">47</li><li style="box-sizing: border-box; padding: 0px 5px;">48</li><li style="box-sizing: border-box; padding: 0px 5px;">49</li><li style="box-sizing: border-box; padding: 0px 5px;">50</li><li style="box-sizing: border-box; padding: 0px 5px;">51</li><li style="box-sizing: border-box; padding: 0px 5px;">52</li><li style="box-sizing: border-box; padding: 0px 5px;">53</li><li style="box-sizing: border-box; padding: 0px 5px;">54</li><li style="box-sizing: border-box; padding: 0px 5px;">55</li><li style="box-sizing: border-box; padding: 0px 5px;">56</li><li style="box-sizing: border-box; padding: 0px 5px;">57</li><li style="box-sizing: border-box; padding: 0px 5px;">58</li><li style="box-sizing: border-box; padding: 0px 5px;">59</li><li style="box-sizing: border-box; padding: 0px 5px;">60</li><li style="box-sizing: border-box; padding: 0px 5px;">61</li><li style="box-sizing: border-box; padding: 0px 5px;">62</li><li style="box-sizing: border-box; padding: 0px 5px;">63</li><li style="box-sizing: border-box; padding: 0px 5px;">64</li><li style="box-sizing: border-box; padding: 0px 5px;">65</li><li style="box-sizing: border-box; padding: 0px 5px;">66</li><li style="box-sizing: border-box; padding: 0px 5px;">67</li><li style="box-sizing: border-box; padding: 0px 5px;">68</li><li style="box-sizing: border-box; padding: 0px 5px;">69</li><li style="box-sizing: border-box; padding: 0px 5px;">70</li><li style="box-sizing: border-box; padding: 0px 5px;">71</li><li style="box-sizing: border-box; padding: 0px 5px;">72</li><li style="box-sizing: border-box; padding: 0px 5px;">73</li><li style="box-sizing: border-box; padding: 0px 5px;">74</li><li style="box-sizing: border-box; padding: 0px 5px;">75</li><li style="box-sizing: border-box; padding: 0px 5px;">76</li><li style="box-sizing: border-box; padding: 0px 5px;">77</li><li style="box-sizing: border-box; padding: 0px 5px;">78</li><li style="box-sizing: border-box; padding: 0px 5px;">79</li><li style="box-sizing: border-box; padding: 0px 5px;">80</li><li style="box-sizing: border-box; padding: 0px 5px;">81</li><li style="box-sizing: border-box; padding: 0px 5px;">82</li><li style="box-sizing: border-box; padding: 0px 5px;">83</li><li style="box-sizing: border-box; padding: 0px 5px;">84</li><li style="box-sizing: border-box; padding: 0px 5px;">85</li><li style="box-sizing: border-box; padding: 0px 5px;">86</li><li style="box-sizing: border-box; padding: 0px 5px;">87</li><li style="box-sizing: border-box; padding: 0px 5px;">88</li><li style="box-sizing: border-box; padding: 0px 5px;">89</li><li style="box-sizing: border-box; padding: 0px 5px;">90</li><li style="box-sizing: border-box; padding: 0px 5px;">91</li><li style="box-sizing: border-box; padding: 0px 5px;">92</li><li style="box-sizing: border-box; padding: 0px 5px;">93</li><li style="box-sizing: border-box; padding: 0px 5px;">94</li><li style="box-sizing: border-box; padding: 0px 5px;">95</li><li style="box-sizing: border-box; padding: 0px 5px;">96</li><li style="box-sizing: border-box; padding: 0px 5px;">97</li><li style="box-sizing: border-box; padding: 0px 5px;">98</li><li style="box-sizing: border-box; padding: 0px 5px;">99</li><li style="box-sizing: border-box; padding: 0px 5px;">100</li><li style="box-sizing: border-box; padding: 0px 5px;">101</li><li style="box-sizing: border-box; padding: 0px 5px;">102</li><li style="box-sizing: border-box; padding: 0px 5px;">103</li><li style="box-sizing: border-box; padding: 0px 5px;">104</li><li style="box-sizing: border-box; padding: 0px 5px;">105</li><li style="box-sizing: border-box; padding: 0px 5px;">106</li><li style="box-sizing: border-box; padding: 0px 5px;">107</li><li style="box-sizing: border-box; padding: 0px 5px;">108</li><li style="box-sizing: border-box; padding: 0px 5px;">109</li><li style="box-sizing: border-box; padding: 0px 5px;">110</li><li style="box-sizing: border-box; padding: 0px 5px;">111</li><li style="box-sizing: border-box; padding: 0px 5px;">112</li><li style="box-sizing: border-box; padding: 0px 5px;">113</li><li style="box-sizing: border-box; padding: 0px 5px;">114</li><li style="box-sizing: border-box; padding: 0px 5px;">115</li><li style="box-sizing: border-box; padding: 0px 5px;">116</li><li style="box-sizing: border-box; padding: 0px 5px;">117</li><li style="box-sizing: border-box; padding: 0px 5px;">118</li><li style="box-sizing: border-box; padding: 0px 5px;">119</li><li style="box-sizing: border-box; padding: 0px 5px;">120</li><li style="box-sizing: border-box; padding: 0px 5px;">121</li><li style="box-sizing: border-box; padding: 0px 5px;">122</li><li style="box-sizing: border-box; padding: 0px 5px;">123</li><li style="box-sizing: border-box; padding: 0px 5px;">124</li><li style="box-sizing: border-box; padding: 0px 5px;">125</li><li style="box-sizing: border-box; padding: 0px 5px;">126</li><li style="box-sizing: border-box; padding: 0px 5px;">127</li><li style="box-sizing: border-box; padding: 0px 5px;">128</li><li style="box-sizing: border-box; padding: 0px 5px;">129</li><li style="box-sizing: border-box; padding: 0px 5px;">130</li><li style="box-sizing: border-box; padding: 0px 5px;">131</li><li style="box-sizing: border-box; padding: 0px 5px;">132</li><li style="box-sizing: border-box; padding: 0px 5px;">133</li><li style="box-sizing: border-box; padding: 0px 5px;">134</li><li style="box-sizing: border-box; padding: 0px 5px;">135</li><li style="box-sizing: border-box; padding: 0px 5px;">136</li><li style="box-sizing: border-box; padding: 0px 5px;">137</li><li style="box-sizing: border-box; padding: 0px 5px;">138</li><li style="box-sizing: border-box; padding: 0px 5px;">139</li><li style="box-sizing: border-box; padding: 0px 5px;">140</li><li style="box-sizing: border-box; padding: 0px 5px;">141</li><li style="box-sizing: border-box; padding: 0px 5px;">142</li><li style="box-sizing: border-box; padding: 0px 5px;">143</li><li style="box-sizing: border-box; padding: 0px 5px;">144</li><li style="box-sizing: border-box; padding: 0px 5px;">145</li><li style="box-sizing: border-box; padding: 0px 5px;">146</li><li style="box-sizing: border-box; padding: 0px 5px;">147</li><li style="box-sizing: border-box; padding: 0px 5px;">148</li><li style="box-sizing: border-box; padding: 0px 5px;">149</li><li style="box-sizing: border-box; padding: 0px 5px;">150</li><li style="box-sizing: border-box; padding: 0px 5px;">151</li><li style="box-sizing: border-box; padding: 0px 5px;">152</li><li style="box-sizing: border-box; padding: 0px 5px;">153</li><li style="box-sizing: border-box; padding: 0px 5px;">154</li><li style="box-sizing: border-box; padding: 0px 5px;">155</li><li style="box-sizing: border-box; padding: 0px 5px;">156</li><li style="box-sizing: border-box; padding: 0px 5px;">157</li><li style="box-sizing: border-box; padding: 0px 5px;">158</li><li style="box-sizing: border-box; padding: 0px 5px;">159</li><li style="box-sizing: border-box; padding: 0px 5px;">160</li><li style="box-sizing: border-box; padding: 0px 5px;">161</li><li style="box-sizing: border-box; padding: 0px 5px;">162</li><li style="box-sizing: border-box; padding: 0px 5px;">163</li><li style="box-sizing: border-box; padding: 0px 5px;">164</li><li style="box-sizing: border-box; padding: 0px 5px;">165</li><li style="box-sizing: border-box; padding: 0px 5px;">166</li><li style="box-sizing: border-box; padding: 0px 5px;">167</li><li style="box-sizing: border-box; padding: 0px 5px;">168</li><li style="box-sizing: border-box; padding: 0px 5px;">169</li><li style="box-sizing: border-box; padding: 0px 5px;">170</li><li style="box-sizing: border-box; padding: 0px 5px;">171</li><li style="box-sizing: border-box; padding: 0px 5px;">172</li><li style="box-sizing: border-box; padding: 0px 5px;">173</li><li style="box-sizing: border-box; padding: 0px 5px;">174</li><li style="box-sizing: border-box; padding: 0px 5px;">175</li><li style="box-sizing: border-box; padding: 0px 5px;">176</li><li style="box-sizing: border-box; padding: 0px 5px;">177</li><li style="box-sizing: border-box; padding: 0px 5px;">178</li><li style="box-sizing: border-box; padding: 0px 5px;">179</li><li style="box-sizing: border-box; padding: 0px 5px;">180</li><li style="box-sizing: border-box; padding: 0px 5px;">181</li><li style="box-sizing: border-box; padding: 0px 5px;">182</li><li style="box-sizing: border-box; padding: 0px 5px;">183</li><li style="box-sizing: border-box; padding: 0px 5px;">184</li><li style="box-sizing: border-box; padding: 0px 5px;">185</li><li style="box-sizing: border-box; padding: 0px 5px;">186</li><li style="box-sizing: border-box; padding: 0px 5px;">187</li><li style="box-sizing: border-box; padding: 0px 5px;">188</li><li style="box-sizing: border-box; padding: 0px 5px;">189</li><li style="box-sizing: border-box; padding: 0px 5px;">190</li><li style="box-sizing: border-box; padding: 0px 5px;">191</li><li style="box-sizing: border-box; padding: 0px 5px;">192</li><li style="box-sizing: border-box; padding: 0px 5px;">193</li><li style="box-sizing: border-box; padding: 0px 5px;">194</li><li style="box-sizing: border-box; padding: 0px 5px;">195</li><li style="box-sizing: border-box; padding: 0px 5px;">196</li><li style="box-sizing: border-box; padding: 0px 5px;">197</li><li style="box-sizing: border-box; padding: 0px 5px;">198</li><li style="box-sizing: border-box; padding: 0px 5px;">199</li><li style="box-sizing: border-box; padding: 0px 5px;">200</li><li style="box-sizing: border-box; padding: 0px 5px;">201</li><li style="box-sizing: border-box; padding: 0px 5px;">202</li><li style="box-sizing: border-box; padding: 0px 5px;">203</li><li style="box-sizing: border-box; padding: 0px 5px;">204</li><li style="box-sizing: border-box; padding: 0px 5px;">205</li><li style="box-sizing: border-box; padding: 0px 5px;">206</li><li style="box-sizing: border-box; padding: 0px 5px;">207</li><li style="box-sizing: border-box; padding: 0px 5px;">208</li><li style="box-sizing: border-box; padding: 0px 5px;">209</li><li style="box-sizing: border-box; padding: 0px 5px;">210</li><li style="box-sizing: border-box; padding: 0px 5px;">211</li><li style="box-sizing: border-box; padding: 0px 5px;">212</li><li style="box-sizing: border-box; padding: 0px 5px;">213</li><li style="box-sizing: border-box; padding: 0px 5px;">214</li><li style="box-sizing: border-box; padding: 0px 5px;">215</li><li style="box-sizing: border-box; padding: 0px 5px;">216</li><li style="box-sizing: border-box; padding: 0px 5px;">217</li><li style="box-sizing: border-box; padding: 0px 5px;">218</li><li style="box-sizing: border-box; padding: 0px 5px;">219</li><li style="box-sizing: border-box; padding: 0px 5px;">220</li><li style="box-sizing: border-box; padding: 0px 5px;">221</li><li style="box-sizing: border-box; padding: 0px 5px;">222</li><li style="box-sizing: border-box; padding: 0px 5px;">223</li><li style="box-sizing: border-box; padding: 0px 5px;">224</li><li style="box-sizing: border-box; padding: 0px 5px;">225</li><li style="box-sizing: border-box; padding: 0px 5px;">226</li><li style="box-sizing: border-box; padding: 0px 5px;">227</li><li style="box-sizing: border-box; padding: 0px 5px;">228</li><li style="box-sizing: border-box; padding: 0px 5px;">229</li><li style="box-sizing: border-box; padding: 0px 5px;">230</li><li style="box-sizing: border-box; padding: 0px 5px;">231</li><li style="box-sizing: border-box; padding: 0px 5px;">232</li><li style="box-sizing: border-box; padding: 0px 5px;">233</li><li style="box-sizing: border-box; padding: 0px 5px;">234</li><li style="box-sizing: border-box; padding: 0px 5px;">235</li><li style="box-sizing: border-box; padding: 0px 5px;">236</li><li style="box-sizing: border-box; padding: 0px 5px;">237</li><li style="box-sizing: border-box; padding: 0px 5px;">238</li><li style="box-sizing: border-box; padding: 0px 5px;">239</li><li style="box-sizing: border-box; padding: 0px 5px;">240</li><li style="box-sizing: border-box; padding: 0px 5px;">241</li><li style="box-sizing: border-box; padding: 0px 5px;">242</li><li style="box-sizing: border-box; padding: 0px 5px;">243</li><li style="box-sizing: border-box; padding: 0px 5px;">244</li><li style="box-sizing: border-box; padding: 0px 5px;">245</li><li style="box-sizing: border-box; padding: 0px 5px;">246</li><li style="box-sizing: border-box; padding: 0px 5px;">247</li><li style="box-sizing: border-box; padding: 0px 5px;">248</li><li style="box-sizing: border-box; padding: 0px 5px;">249</li><li style="box-sizing: border-box; padding: 0px 5px;">250</li><li style="box-sizing: border-box; padding: 0px 5px;">251</li><li style="box-sizing: border-box; padding: 0px 5px;">252</li><li style="box-sizing: border-box; padding: 0px 5px;">253</li><li style="box-sizing: border-box; padding: 0px 5px;">254</li><li style="box-sizing: border-box; padding: 0px 5px;">255</li><li style="box-sizing: border-box; padding: 0px 5px;">256</li><li style="box-sizing: border-box; padding: 0px 5px;">257</li><li style="box-sizing: border-box; padding: 0px 5px;">258</li><li style="box-sizing: border-box; padding: 0px 5px;">259</li><li style="box-sizing: border-box; padding: 0px 5px;">260</li><li style="box-sizing: border-box; padding: 0px 5px;">261</li><li style="box-sizing: border-box; padding: 0px 5px;">262</li><li style="box-sizing: border-box; padding: 0px 5px;">263</li><li style="box-sizing: border-box; padding: 0px 5px;">264</li><li style="box-sizing: border-box; padding: 0px 5px;">265</li><li style="box-sizing: border-box; padding: 0px 5px;">266</li><li style="box-sizing: border-box; padding: 0px 5px;">267</li><li style="box-sizing: border-box; padding: 0px 5px;">268</li><li style="box-sizing: border-box; padding: 0px 5px;">269</li><li style="box-sizing: border-box; padding: 0px 5px;">270</li><li style="box-sizing: border-box; padding: 0px 5px;">271</li><li style="box-sizing: border-box; padding: 0px 5px;">272</li><li style="box-sizing: border-box; padding: 0px 5px;">273</li><li style="box-sizing: border-box; padding: 0px 5px;">274</li><li style="box-sizing: border-box; padding: 0px 5px;">275</li><li style="box-sizing: border-box; padding: 0px 5px;">276</li><li style="box-sizing: border-box; padding: 0px 5px;">277</li><li style="box-sizing: border-box; padding: 0px 5px;">278</li><li style="box-sizing: border-box; padding: 0px 5px;">279</li><li style="box-sizing: border-box; padding: 0px 5px;">280</li><li style="box-sizing: border-box; padding: 0px 5px;">281</li><li style="box-sizing: border-box; padding: 0px 5px;">282</li></ul>

④ 在加载Java文件的时候,需要访问setclasspath.bat文件;来寻早到java的路径,如果没有配置JAVA_HOME和JAR_HOME环境变量,可以在路径寻找之前用set JAVA_HOME=”jdk所在路径”来设置访问路径。文件如下:

<code class="hljs vhdl has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;">@echo off
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Licensed <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> the Apache Software Foundation (ASF) under one <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">or</span> more
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> contributor license agreements.  See the NOTICE <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">file</span> distributed <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">with</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> this work <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">for</span> additional information regarding copyright ownership.
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> The ASF licenses this <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">file</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> You under the Apache License, Version <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">2.0</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> (the <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"License"</span>); you may <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">use</span> this <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">file</span> except <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> compliance <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">with</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> the License.  You may obtain a copy <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">of</span> the License at
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>     http://www.apache.org/licenses/LICENSE-<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">2.0</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Unless required by applicable law <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">or</span> agreed <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> writing, software
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> distributed under the License <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> distributed <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">on</span> an <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"AS IS"</span> BASIS,
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> WITHOUT WARRANTIES <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">OR</span> CONDITIONS <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">OF</span> ANY KIND, either express <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">or</span> implied.
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> See the License <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">for</span> the specific language governing permissions <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">and</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> limitations under the License.

<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">---------------------------------------------------------------------------</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Set CLASSPATH <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">and</span> Java options
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">---------------------------------------------------------------------------</span>

<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Make sure prerequisite environment variables are set
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%JAVA_HOME%"</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto gotJdkHome
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%JRE_HOME%"</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto gotJreHome
echo Neither the JAVA_HOME <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">nor</span> the JRE_HOME environment <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">variable</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> defined
echo At least one <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">of</span> these environment <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">variable</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> needed <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> run this program
goto <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">exit</span>

:gotJreHome
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> exist <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%JRE_HOME%\bin\java.exe"</span> goto noJavaHome
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> exist <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%JRE_HOME%\bin\javaw.exe"</span> goto noJavaHome
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span>%<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1</span><span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span>debug<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto okJavaHome
echo JAVA_HOME should point <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> a JDK <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> order <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> run <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> debug mode.
goto <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">exit</span>

:gotJdkHome
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> exist <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%JAVA_HOME%\bin\java.exe"</span> goto noJavaHome
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> exist <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%JAVA_HOME%\bin\javaw.exe"</span> goto noJavaHome
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> exist <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%JAVA_HOME%\bin\jdb.exe"</span> goto noJavaHome
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> exist <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%JAVA_HOME%\bin\javac.exe"</span> goto noJavaHome
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%JRE_HOME%"</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto okJavaHome
set <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"JRE_HOME=%JAVA_HOME%"</span>
goto okJavaHome

:noJavaHome
echo The JAVA_HOME environment <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">variable</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> defined correctly
echo This environment <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">variable</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> needed <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> run this program
echo NB: JAVA_HOME should point <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> a JDK <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> a JRE
goto <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">exit</span>
:okJavaHome

<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%BASEDIR%"</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto gotBasedir
echo The BASEDIR environment <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">variable</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> defined
echo This environment <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">variable</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> needed <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> run this program
goto <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">exit</span>
:gotBasedir
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> exist <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%BASEDIR%\bin\setclasspath.bat"</span> goto okBasedir
echo The BASEDIR environment <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">variable</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> defined correctly
echo This environment <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">variable</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> needed <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> run this program
goto <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">exit</span>
:okBasedir

<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Don<span class="hljs-attribute" style="box-sizing: border-box;">'t</span> override the endorsed dir <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> the user has set it previously
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%JAVA_ENDORSED_DIRS%"</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto gotEndorseddir
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Set the <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">default</span> -Djava.endorsed.dirs argument
set <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"JAVA_ENDORSED_DIRS=%BASEDIR%\endorsed"</span>
:gotEndorseddir

<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Don<span class="hljs-attribute" style="box-sizing: border-box;">'t</span> override _RUNJAVA <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> the user has set it previously
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%_RUNJAVA%"</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto gotRunJava
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Set standard command <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">for</span> invoking Java.
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Also note the quoting as JRE_HOME may contain spaces.
set _RUNJAVA=<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%JRE_HOME%\bin\java.exe"</span>
:gotRunJava

<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Don<span class="hljs-attribute" style="box-sizing: border-box;">'t</span> override _RUNJDB <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> the user has set it previously
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">rem</span> Also note the quoting as JAVA_HOME may contain spaces.
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">if</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%_RUNJDB%"</span> == <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">""</span> goto gotRunJdb
set _RUNJDB=<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"%JAVA_HOME%\bin\jdb.exe"</span>
:gotRunJdb

goto <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">end</span>

:<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">exit</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">exit</span> /b <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1</span>

:<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">end</span>
<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">exit</span> /b <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">0</span></code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li><li style="box-sizing: border-box; padding: 0px 5px;">6</li><li style="box-sizing: border-box; padding: 0px 5px;">7</li><li style="box-sizing: border-box; padding: 0px 5px;">8</li><li style="box-sizing: border-box; padding: 0px 5px;">9</li><li style="box-sizing: border-box; padding: 0px 5px;">10</li><li style="box-sizing: border-box; padding: 0px 5px;">11</li><li style="box-sizing: border-box; padding: 0px 5px;">12</li><li style="box-sizing: border-box; padding: 0px 5px;">13</li><li style="box-sizing: border-box; padding: 0px 5px;">14</li><li style="box-sizing: border-box; padding: 0px 5px;">15</li><li style="box-sizing: border-box; padding: 0px 5px;">16</li><li style="box-sizing: border-box; padding: 0px 5px;">17</li><li style="box-sizing: border-box; padding: 0px 5px;">18</li><li style="box-sizing: border-box; padding: 0px 5px;">19</li><li style="box-sizing: border-box; padding: 0px 5px;">20</li><li style="box-sizing: border-box; padding: 0px 5px;">21</li><li style="box-sizing: border-box; padding: 0px 5px;">22</li><li style="box-sizing: border-box; padding: 0px 5px;">23</li><li style="box-sizing: border-box; padding: 0px 5px;">24</li><li style="box-sizing: border-box; padding: 0px 5px;">25</li><li style="box-sizing: border-box; padding: 0px 5px;">26</li><li style="box-sizing: border-box; padding: 0px 5px;">27</li><li style="box-sizing: border-box; padding: 0px 5px;">28</li><li style="box-sizing: border-box; padding: 0px 5px;">29</li><li style="box-sizing: border-box; padding: 0px 5px;">30</li><li style="box-sizing: border-box; padding: 0px 5px;">31</li><li style="box-sizing: border-box; padding: 0px 5px;">32</li><li style="box-sizing: border-box; padding: 0px 5px;">33</li><li style="box-sizing: border-box; padding: 0px 5px;">34</li><li style="box-sizing: border-box; padding: 0px 5px;">35</li><li style="box-sizing: border-box; padding: 0px 5px;">36</li><li style="box-sizing: border-box; padding: 0px 5px;">37</li><li style="box-sizing: border-box; padding: 0px 5px;">38</li><li style="box-sizing: border-box; padding: 0px 5px;">39</li><li style="box-sizing: border-box; padding: 0px 5px;">40</li><li style="box-sizing: border-box; padding: 0px 5px;">41</li><li style="box-sizing: border-box; padding: 0px 5px;">42</li><li style="box-sizing: border-box; padding: 0px 5px;">43</li><li style="box-sizing: border-box; padding: 0px 5px;">44</li><li style="box-sizing: border-box; padding: 0px 5px;">45</li><li style="box-sizing: border-box; padding: 0px 5px;">46</li><li style="box-sizing: border-box; padding: 0px 5px;">47</li><li style="box-sizing: border-box; padding: 0px 5px;">48</li><li style="box-sizing: border-box; padding: 0px 5px;">49</li><li style="box-sizing: border-box; padding: 0px 5px;">50</li><li style="box-sizing: border-box; padding: 0px 5px;">51</li><li style="box-sizing: border-box; padding: 0px 5px;">52</li><li style="box-sizing: border-box; padding: 0px 5px;">53</li><li style="box-sizing: border-box; padding: 0px 5px;">54</li><li style="box-sizing: border-box; padding: 0px 5px;">55</li><li style="box-sizing: border-box; padding: 0px 5px;">56</li><li style="box-sizing: border-box; padding: 0px 5px;">57</li><li style="box-sizing: border-box; padding: 0px 5px;">58</li><li style="box-sizing: border-box; padding: 0px 5px;">59</li><li style="box-sizing: border-box; padding: 0px 5px;">60</li><li style="box-sizing: border-box; padding: 0px 5px;">61</li><li style="box-sizing: border-box; padding: 0px 5px;">62</li><li style="box-sizing: border-box; padding: 0px 5px;">63</li><li style="box-sizing: border-box; padding: 0px 5px;">64</li><li style="box-sizing: border-box; padding: 0px 5px;">65</li><li style="box-sizing: border-box; padding: 0px 5px;">66</li><li style="box-sizing: border-box; padding: 0px 5px;">67</li><li style="box-sizing: border-box; padding: 0px 5px;">68</li><li style="box-sizing: border-box; padding: 0px 5px;">69</li><li style="box-sizing: border-box; padding: 0px 5px;">70</li><li style="box-sizing: border-box; padding: 0px 5px;">71</li><li style="box-sizing: border-box; padding: 0px 5px;">72</li><li style="box-sizing: border-box; padding: 0px 5px;">73</li><li style="box-sizing: border-box; padding: 0px 5px;">74</li><li style="box-sizing: border-box; padding: 0px 5px;">75</li><li style="box-sizing: border-box; padding: 0px 5px;">76</li><li style="box-sizing: border-box; padding: 0px 5px;">77</li><li style="box-sizing: border-box; padding: 0px 5px;">78</li><li style="box-sizing: border-box; padding: 0px 5px;">79</li><li style="box-sizing: border-box; padding: 0px 5px;">80</li><li style="box-sizing: border-box; padding: 0px 5px;">81</li><li style="box-sizing: border-box; padding: 0px 5px;">82</li><li style="box-sizing: border-box; padding: 0px 5px;">83</li><li style="box-sizing: border-box; padding: 0px 5px;">84</li><li style="box-sizing: border-box; padding: 0px 5px;">85</li><li style="box-sizing: border-box; padding: 0px 5px;">86</li><li style="box-sizing: border-box; padding: 0px 5px;">87</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li><li style="box-sizing: border-box; padding: 0px 5px;">6</li><li style="box-sizing: border-box; padding: 0px 5px;">7</li><li style="box-sizing: border-box; padding: 0px 5px;">8</li><li style="box-sizing: border-box; padding: 0px 5px;">9</li><li style="box-sizing: border-box; padding: 0px 5px;">10</li><li style="box-sizing: border-box; padding: 0px 5px;">11</li><li style="box-sizing: border-box; padding: 0px 5px;">12</li><li style="box-sizing: border-box; padding: 0px 5px;">13</li><li style="box-sizing: border-box; padding: 0px 5px;">14</li><li style="box-sizing: border-box; padding: 0px 5px;">15</li><li style="box-sizing: border-box; padding: 0px 5px;">16</li><li style="box-sizing: border-box; padding: 0px 5px;">17</li><li style="box-sizing: border-box; padding: 0px 5px;">18</li><li style="box-sizing: border-box; padding: 0px 5px;">19</li><li style="box-sizing: border-box; padding: 0px 5px;">20</li><li style="box-sizing: border-box; padding: 0px 5px;">21</li><li style="box-sizing: border-box; padding: 0px 5px;">22</li><li style="box-sizing: border-box; padding: 0px 5px;">23</li><li style="box-sizing: border-box; padding: 0px 5px;">24</li><li style="box-sizing: border-box; padding: 0px 5px;">25</li><li style="box-sizing: border-box; padding: 0px 5px;">26</li><li style="box-sizing: border-box; padding: 0px 5px;">27</li><li style="box-sizing: border-box; padding: 0px 5px;">28</li><li style="box-sizing: border-box; padding: 0px 5px;">29</li><li style="box-sizing: border-box; padding: 0px 5px;">30</li><li style="box-sizing: border-box; padding: 0px 5px;">31</li><li style="box-sizing: border-box; padding: 0px 5px;">32</li><li style="box-sizing: border-box; padding: 0px 5px;">33</li><li style="box-sizing: border-box; padding: 0px 5px;">34</li><li style="box-sizing: border-box; padding: 0px 5px;">35</li><li style="box-sizing: border-box; padding: 0px 5px;">36</li><li style="box-sizing: border-box; padding: 0px 5px;">37</li><li style="box-sizing: border-box; padding: 0px 5px;">38</li><li style="box-sizing: border-box; padding: 0px 5px;">39</li><li style="box-sizing: border-box; padding: 0px 5px;">40</li><li style="box-sizing: border-box; padding: 0px 5px;">41</li><li style="box-sizing: border-box; padding: 0px 5px;">42</li><li style="box-sizing: border-box; padding: 0px 5px;">43</li><li style="box-sizing: border-box; padding: 0px 5px;">44</li><li style="box-sizing: border-box; padding: 0px 5px;">45</li><li style="box-sizing: border-box; padding: 0px 5px;">46</li><li style="box-sizing: border-box; padding: 0px 5px;">47</li><li style="box-sizing: border-box; padding: 0px 5px;">48</li><li style="box-sizing: border-box; padding: 0px 5px;">49</li><li style="box-sizing: border-box; padding: 0px 5px;">50</li><li style="box-sizing: border-box; padding: 0px 5px;">51</li><li style="box-sizing: border-box; padding: 0px 5px;">52</li><li style="box-sizing: border-box; padding: 0px 5px;">53</li><li style="box-sizing: border-box; padding: 0px 5px;">54</li><li style="box-sizing: border-box; padding: 0px 5px;">55</li><li style="box-sizing: border-box; padding: 0px 5px;">56</li><li style="box-sizing: border-box; padding: 0px 5px;">57</li><li style="box-sizing: border-box; padding: 0px 5px;">58</li><li style="box-sizing: border-box; padding: 0px 5px;">59</li><li style="box-sizing: border-box; padding: 0px 5px;">60</li><li style="box-sizing: border-box; padding: 0px 5px;">61</li><li style="box-sizing: border-box; padding: 0px 5px;">62</li><li style="box-sizing: border-box; padding: 0px 5px;">63</li><li style="box-sizing: border-box; padding: 0px 5px;">64</li><li style="box-sizing: border-box; padding: 0px 5px;">65</li><li style="box-sizing: border-box; padding: 0px 5px;">66</li><li style="box-sizing: border-box; padding: 0px 5px;">67</li><li style="box-sizing: border-box; padding: 0px 5px;">68</li><li style="box-sizing: border-box; padding: 0px 5px;">69</li><li style="box-sizing: border-box; padding: 0px 5px;">70</li><li style="box-sizing: border-box; padding: 0px 5px;">71</li><li style="box-sizing: border-box; padding: 0px 5px;">72</li><li style="box-sizing: border-box; padding: 0px 5px;">73</li><li style="box-sizing: border-box; padding: 0px 5px;">74</li><li style="box-sizing: border-box; padding: 0px 5px;">75</li><li style="box-sizing: border-box; padding: 0px 5px;">76</li><li style="box-sizing: border-box; padding: 0px 5px;">77</li><li style="box-sizing: border-box; padding: 0px 5px;">78</li><li style="box-sizing: border-box; padding: 0px 5px;">79</li><li style="box-sizing: border-box; padding: 0px 5px;">80</li><li style="box-sizing: border-box; padding: 0px 5px;">81</li><li style="box-sizing: border-box; padding: 0px 5px;">82</li><li style="box-sizing: border-box; padding: 0px 5px;">83</li><li style="box-sizing: border-box; padding: 0px 5px;">84</li><li style="box-sizing: border-box; padding: 0px 5px;">85</li><li style="box-sizing: border-box; padding: 0px 5px;">86</li><li style="box-sizing: border-box; padding: 0px 5px;">87</li></ul>

⑤ 在里这CATALINA_HOME文件夹下面的.bat文件加载完毕后,会加载conf下面catalina.properties文件,根据该配置文件的顺序,执行里面的server.xml调用项目的配置文件和tomcat-users.xml检查调用权限。 
关于使用tomcat发布项目的四种方式:

  1. 直接把项目复制到Tomcat安装目录的webapps目录中,这是最简单的一种Tomcat项目部署的方法,也是初学者最常用的方法。
  2. 在tomcat安装目录中有一个conf文件夹,打开此文件夹,其中包含配置文件server.xml,打开配置文件,并在和之间插入如下语句。 

    其中,docBase为设置项目的路径。
  3. 在tomcat安装目录下的conf目录下面,打开server.xml文件,在标签之间,添加
<code class="hljs xml has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;"><span class="hljs-tag" style="color: rgb(0, 102, 102); box-sizing: border-box;"><<span class="hljs-title" style="box-sizing: border-box; color: rgb(0, 0, 136);">Service</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">name</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"culture"</span>></span> 
     <span class="hljs-tag" style="color: rgb(0, 102, 102); box-sizing: border-box;"><<span class="hljs-title" style="box-sizing: border-box; color: rgb(0, 0, 136);">Connector</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">port</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"6011"</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">maxHttpHeaderSize</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"8906"</span>
               <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">maxThreads</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"150"</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">minSpareThreads</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"25"</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">maxSpareThreads</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"75"</span>
               <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">enableLookups</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"false"</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">redirectPort</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"8443"</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">acceptCount</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"100"</span>
               <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">connectionTimeout</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"20000"</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">disableUploadTimeout</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"true"</span>
           <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">URIEncoding</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"utf-8"</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">useBodyEncodingForURI</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"true"</span> /></span>
    <span class="hljs-tag" style="color: rgb(0, 102, 102); box-sizing: border-box;"><<span class="hljs-title" style="box-sizing: border-box; color: rgb(0, 0, 136);">Engine</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">name</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"culture"</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">defaultHost</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"localhost"</span>></span>
      <span class="hljs-tag" style="color: rgb(0, 102, 102); box-sizing: border-box;"><<span class="hljs-title" style="box-sizing: border-box; color: rgb(0, 0, 136);">Realm</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">className</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"org.apache.catalina.realm.UserDatabaseRealm"</span>
             <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">resourceName</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"UserDatabase"</span> /></span>
     <span class="hljs-tag" style="color: rgb(0, 102, 102); box-sizing: border-box;"><<span class="hljs-title" style="box-sizing: border-box; color: rgb(0, 0, 136);">Host</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">name</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"localhost"</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">appBase</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">""</span>></span>
       <span class="hljs-tag" style="color: rgb(0, 102, 102); box-sizing: border-box;"><<span class="hljs-title" style="box-sizing: border-box; color: rgb(0, 0, 136);">Context</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">path</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">""</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">docBase</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"E:\ZRPDWorkspaces\MyEclipse Professional 2014\finance_culture\WebRoot"</span>
                 <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">debug</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"5"</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">reloadable</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"true"</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">crossContext</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"true"</span>></span>

             <span class="hljs-tag" style="color: rgb(0, 102, 102); box-sizing: border-box;"><<span class="hljs-title" style="box-sizing: border-box; color: rgb(0, 0, 136);">Resource</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">name</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"jdbc/itfin"</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">auth</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"Container"</span><span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">type="javax.sql.DataSource"</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">maxActive</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"100"</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">maxIdle</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"30"</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">maxWait</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"10000"</span> 
                    <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">username</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"root"</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">password</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"bigdata@mysql"</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">driverClassName</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"com.mysql.jdbc.Driver"</span> 
                    <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">url</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"jdbc:mysql://192.168.1.197:3306/culture?autoReconnect=true&amp;characterEncoding=utf-8&amp;zeroDateTimeBehavior=convertToNull"</span>/></span>   
        <span class="hljs-tag" style="color: rgb(0, 102, 102); box-sizing: border-box;"></<span class="hljs-title" style="box-sizing: border-box; color: rgb(0, 0, 136);">Context</span>></span>
      <span class="hljs-tag" style="color: rgb(0, 102, 102); box-sizing: border-box;"></<span class="hljs-title" style="box-sizing: border-box; color: rgb(0, 0, 136);">Host</span>></span>
    <span class="hljs-tag" style="color: rgb(0, 102, 102); box-sizing: border-box;"></<span class="hljs-title" style="box-sizing: border-box; color: rgb(0, 0, 136);">Engine</span>></span>
      <span class="hljs-tag" style="color: rgb(0, 102, 102); box-sizing: border-box;"></<span class="hljs-title" style="box-sizing: border-box; color: rgb(0, 0, 136);">Service</span>></span></code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li><li style="box-sizing: border-box; padding: 0px 5px;">6</li><li style="box-sizing: border-box; padding: 0px 5px;">7</li><li style="box-sizing: border-box; padding: 0px 5px;">8</li><li style="box-sizing: border-box; padding: 0px 5px;">9</li><li style="box-sizing: border-box; padding: 0px 5px;">10</li><li style="box-sizing: border-box; padding: 0px 5px;">11</li><li style="box-sizing: border-box; padding: 0px 5px;">12</li><li style="box-sizing: border-box; padding: 0px 5px;">13</li><li style="box-sizing: border-box; padding: 0px 5px;">14</li><li style="box-sizing: border-box; padding: 0px 5px;">15</li><li style="box-sizing: border-box; padding: 0px 5px;">16</li><li style="box-sizing: border-box; padding: 0px 5px;">17</li><li style="box-sizing: border-box; padding: 0px 5px;">18</li><li style="box-sizing: border-box; padding: 0px 5px;">19</li><li style="box-sizing: border-box; padding: 0px 5px;">20</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li><li style="box-sizing: border-box; padding: 0px 5px;">6</li><li style="box-sizing: border-box; padding: 0px 5px;">7</li><li style="box-sizing: border-box; padding: 0px 5px;">8</li><li style="box-sizing: border-box; padding: 0px 5px;">9</li><li style="box-sizing: border-box; padding: 0px 5px;">10</li><li style="box-sizing: border-box; padding: 0px 5px;">11</li><li style="box-sizing: border-box; padding: 0px 5px;">12</li><li style="box-sizing: border-box; padding: 0px 5px;">13</li><li style="box-sizing: border-box; padding: 0px 5px;">14</li><li style="box-sizing: border-box; padding: 0px 5px;">15</li><li style="box-sizing: border-box; padding: 0px 5px;">16</li><li style="box-sizing: border-box; padding: 0px 5px;">17</li><li style="box-sizing: border-box; padding: 0px 5px;">18</li><li style="box-sizing: border-box; padding: 0px 5px;">19</li><li style="box-sizing: border-box; padding: 0px 5px;">20</li></ul>

4.在conf目录中,在Catalina\localhost(此处需要注意目录的大小写)目录下新建一个XML文件,任意命名,只要和当前文件中的文件名不重复即可,代码如下。 

第四种方法相对来说比较灵活,并且可以设置别名。该目录下面自身有两个tomcat容器的xml文件;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值