简体   繁体   中英

Why does Tomcat not start when including JAVA_OPTS Xmx?

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM