apache 6 tomcat setenv.bat file the input line is too long

Tag: apache , batch-file , tomcat6 , javaagents Author: shen_ronaldo Date: 2012-07-17

When I try to start my apache server with the startup batch file. I get this error message:

the input line is too long
"C:\Tomcat\apache-tomcat-6.0.35\bin\setenv.bat" was unexpected at this time.

My setenv.bat looks like this:

set CATALINA_OPTS=" %CATALINA_OPTS% -javaagent:C:\jp2-2.1\lib\jborat-agent.jar -Dch.usi.dag.jborat.exclusionList="C:\jp2-2.1\conf\exclusion.lst" -Dch.usi.dag.jborat.liblist="C:\jp2-2.1\conf\lib.lst" -Dch.usi.dag.jp2.outputFilePrefix="Profiling" -Dch.usi.dag.jp2.dumpers="ch.usi.dag.jp2.dump.xml.XmlDumper" -Dch.usi.dag.jborat.instrumentation="ch.usi.dag.jp2.instrument.AddInstrumentation" -Dch.usi.dag.jborat.codemergerList="C:\jp2-2.1\conf\codemerger.lst" -Dch.usi.dag.jborat.uninstrumented="uninstrumented" -Dch.usi.dag.jborat.instrumented="instrumented" -Xbootclasspath/p:C:\jp2-2.1\lib\Thread_JP2.jar;C:\jp2-2.1\lib\jborat-runtime.jar;C:\jp2-2.1\lib\jp2-runtime.jar"
C:\Tomcat\apache-tomcat-6.0.35\bin\startup.bat

thanks in advance.

I don't know that this will solve anything. But your first quote is misplaced in your setenv.bat. The SET statement should start like set "CATALINA_OPTS=%CATALINA_OPTS% -javaagent:...

Other Answer1

I don't think you should be calling your "startup.bat" file within your "setenv.bat" file. The "setenv.bat" file is conditionally called by "catalina.bat" I believe which was itself called by "startup.bat" in a normal Tomcat setup.