我有一个tomcat文件夹。我可以使用catalina.bat run
命令以及cmd提示符中的startup.bat
命令启动tomcat,并且能够访问URL:http://localhost:6080/
但是我有以下setenv.bat
@echo off
rem - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
rem DO NOT MODIFY THE TEMPLATE FILE. INSTEAD, COPY THIS FILE AS setenv.bat
rem AND MAKE THE NECESSARY CHANGES IN THAT FILE.
rem - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
rem - - - - - - - - - - - - - - - - - - - - - - -
rem Set JAVA_HOME to a valid JDK installation dir
rem e.g. set JAVA_HOME=C:\apps\java\1.6.0.14
rem - - - - - - - - - - - - - - - - - - - - - - -
set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_25
rem - - - - - - - - - - - - - - - - - - - - - -
rem Set ANT_HOME to a valid ANT installation dir
rem e.g. set ANT_HOME=C:\apps\ant\1.8.2
rem - - - - - - - - - - - - - - - - - - - - - -
set ANT_HOME=C:\my_work\DOM\DSGI\ENV_SETUP\apache-ant-1.9.4
rem - - - - - - - - - - - - - - - - - - - - - - - - - - -
rem Set PATH to include bin directories from JDK and ANT
rem - - - - - - - - - - - - - - - - - - - - - - - - - - -
set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%LIBPATH%;%PATH%
rem - - - - - - - - - - - - - - - - - - - - - - - -
rem Set ANT_OPTS to increase the ANT runtime memory
rem e.g. set ANT_OPTS=-Xmx1444m -XX:MaxPermSize=256m
rem - - - - - - - - - - - - - - - - - - - - - - - -
set ANT_OPTS=-Xmx1444m -XX:MaxPermSize=256m
@echo on
当我尝试使用ant tomcat启动tomcat时,没有出现,我无法访问该URL。
首先我执行了setenv.bat
之后,当我在做蚂蚁时,开始对下面的结果进行控制。
C:\app\scope\olm\scope-studio\mip-2015>ant start
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre7\lib\tools.jar
Buildfile: C:\app\scope\olm\scope-studio\mip-2015\build.xml
-init:
[echo] Current OS Family: windows
[echo] ANT_HOME is set to = C:\my_work\DOM\DSGI\ENV_SETUP\apache-ant-1.9.4
[echo] JAVA_HOME is set to = C:\Program Files\Java\jdk1.7.0_25
start:
[echo] MIP tomcat server instance started
BUILD SUCCESSFUL
Total time: 25 seconds