欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

启动tomcat,报错 Error occurred during initialization of VM Could not reserve enough space for object

程序员文章站 2022-07-14 10:33:27
...

启动tomcat时,鼠标双击startup.bat出现闪退现象,出现运行错误,localhost:8080网页自然也无法打开。

1、可以在编辑startup.bat,在其末尾加入一行 ,目的为了查看运行报错的信息。为了更加详细的看到信息,我们再来更改一句:找到call "%EXECUTABLE%" run %CMD_LINE_ARGS% 把里面的start替换为run。

pause

启动tomcat,报错 Error occurred during initialization of VM Could not reserve enough space for object

2、加入后,保存,运行startup.bat,报错信息提示Error occurred during initialization of VM Could not reserve enough space for object heap,原因是catalina.sh文件的tomcat内存参数配置过大,超过机器可用内存总数造成,修改到适当的值即可。

启动tomcat,报错 Error occurred during initialization of VM Could not reserve enough space for object

3、在Tomcat的bin目录下找到catalina.bat并编辑加入,保存后退出再运行startup.bat就可以了。

set JAVA_OPTS=-server -Xms512m -Xmx512m  -XX:PermSize=256m -XX:MaxPermSize=256m

启动tomcat,报错 Error occurred during initialization of VM Could not reserve enough space for object

相关标签: Tomcat 闪退