1

I have Tomcat 7 on my local Windows 7 machine. When I include -Xmx in my catalina.bat file for JAVA_OPTS Tomcat does not start. But runs if it is removed. What could cause this to happen? Is my syntax wrong?

catalina.bat file:

set JAVA_OPTS=-Xms128m –Xmx1024m -XX:PermSize=256m -Djava.rmi.server.hostname=MY_IP
dnelson
  • 467
  • 1
  • 4
  • 16
  • that should be in CATALINA_OPTS, not JAVA_OPTS, although I have no idea off the top why putting it in JAVA_OPTS would prevent startup at all. – Affe Feb 27 '13 at 23:37
  • Thanks for the recommendation. But replacing JAVA with CATALINA did not seem to work. It must be something trivial that I am missing. – dnelson Feb 27 '13 at 23:41

1 Answers1

1

Sometimes it might not function when the memory you specify is more than the available memory allocated to the VM by the environment in which it is running. Inspect the logs to find the specific error/exception being thrown.

Note that the available system memory might not all be available to the JVM regardless of the cap you specify. This depends on other applications that are running. The OS generally has the upper hand on memory allocation.

Also, this answer might help you.

Community
  • 1
  • 1
  • You were right it was a memory issue. I changed to `-Xms128m -Xmx920m -XX:PermSize=320m` and it started right up. – dnelson Feb 28 '13 at 00:00