How to set HeapDumpOnOutOfMemoryError and HeapDumpPath to startup.bat file in Windows XP

Where are the HeapDumpOnOutOfMemoryError and HeapDumpPath parameters set in the startup.bat file for Tomcat on a Windows PC? I put both parameters in the file as follows:

set JAVA_OPTS=-Xms100m -Xmx192m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=c:\jakarta-tomcat\webapps call "%EXECUTABLE%" start %CMD_LINE_ARGS% :end 

Is this the area in which these parameters should go? I get the following message when I start Tomcat> Invalid file name, directory or volume name.

I am not sure which part of the statement is wrong. What am I missing here?

+4
source share
1 answer

If you want to split the command into several lines, you need to remove the newline characters.

 set JAVA_OPTS=-Xms100m -Xmx192m ^ -XX:+HeapDumpOnOutOfMemoryError ^ -XX:HeapDumpPath=c:\jakarta-tomcat\webapps 
+13
source

Source: https://habr.com/ru/post/1334994/


All Articles