1
Sirs !
I have a . bat file that I use to start Apache Tomcat from my application in debug mode. But while running this file on CMD, the first thing displayed is the following message:
'' is not recognized as an internal command or external, a operable program or a batch file.
I stress that after this, the script works normally, but I would like to know if anyone has ever been through something similar or knows any solution. I had tried to do the same, but the error persists.
Below is the contents of the file:
@echo off
echo.
rd /s /q C:\tomcat\work\
rd /s /q C:\tomcat\conf\Catalina\
del /s /q C:\tomcat\logs\*
del /s /q C:\tomcat\temp\*
del /s /q C:\tomcat\webapps\sa\WEB-INF\web.xml.template
del /s /q C:\tomcat\webapps\sa\META-INF\context.xml.template
echo.
set CATALINA_HOME=C:\tomcat
set CATALINA_BASE=C:\tomcat
set JAVA_HOME=C:\java\jdk7
set INSTANCE=C:\instance
set CATALINA_OPTS=-Xms256m -Xmx512m -XX:MaxPermSize=256m
set CATALINA_OPTS=%CATALINA_OPTS% -Dfile.encoding=UTF-8
set CATALINA_OPTS=%CATALINA_OPTS% -Djava.awt.headless=false
set CATALINA_OPTS=%CATALINA_OPTS% -Dcom.sun.management.jmxremote
set CATALINA_OPTS=%CATALINA_OPTS% -Dcom.sun.management.jmxremote.port=9014
set CATALINA_OPTS=%CATALINA_OPTS% -Dcom.sun.management.jmxremote.ssl=false
set CATALINA_OPTS=%CATALINA_OPTS% -Dcom.sun.management.jmxremote.authenticate=false
set CATALINA_OPTS=%CATALINA_OPTS% -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
set CATALINA_OPTS=%CATALINA_OPTS% -Duser.timezone=America/Sao_Paulo
set CATALINA_OPTS=%CATALINA_OPTS% -Duser.language=pt
set CATALINA_OPTS=%CATALINA_OPTS% -Duser.region=BR
set CATALINA_OPTS=%CATALINA_OPTS% -Dsun.java2d.noddraw=true
set CATALINA_OPTS=%CATALINA_OPTS% -Dsun.java2d.d3d=false
set CATALINA_OPTS=%CATALINA_OPTS% -Xdebug
set CATALINA_OPTS=%CATALINA_OPTS% -Xrunjdwp:transport=dt_socket,address=8990,server=y,suspend=n
%CATALINA_HOME%\bin\startup.bat
Are you sure this is the bat and not the startup.bat? If you copy the contents of that bat such as this one here and save in another bat file and runs it error also occurs?
– Reginaldo Rigo
Hi Reginaldo ! The problem is in this . bat probably because the error is displayed on the screen before the first action of the script and the startup call is the last step. I stress that yes, I tried to recreate the . bat as you suggest and the error persisted. Thank you !
– Luís Felipe Dal Molin
Save the file with ANSI pattern, and test.
– David