Search code examples
javawindowstomcatjava-opts

Changing Xmx to something else than 1024m leads to failing startup


I want to allocate more heap space to my tomcat JVM running on a Windows machine. Regardless which value I choose or how/where I configure it, the startup.bat refuses to do its job afterwards. It only runs if it's set to "1024m".

I even have changed (test-wise) the amount in "catalina.bat" like this:

set CATALINA_OPTS= -Xmx2048m

(and it runs with set CATALINA_OPTS= -Xmx1024m)

When I call startup.bat a new cmd window appears for a second. The "calling" cmd window doesn't do anything. The tomcat server doesn't even collect any logs.


Solution

  • Instead of startup.bat, try using catalina.bat.

    The catalina.bat script takes various optional parameters, once of which is run, which Tomcat starts in the current window.

    i.e. type the following:

    catalina run

    then you should be able to see any error messages.