启动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
2、加入后,保存,运行startup.bat,报错信息提示Error occurred during initialization of VM Could not reserve enough space for object heap,原因是catalina.sh文件的tomcat内存参数配置过大,超过机器可用内存总数造成,修改到适当的值即可。
3、在Tomcat的bin目录下找到catalina.bat并编辑加入,保存后退出再运行startup.bat就可以了。
set JAVA_OPTS=-server -Xms512m -Xmx512m -XX:PermSize=256m -XX:MaxPermSize=256m
推荐阅读
-
Error occurred during initialization of VM Could not reserve enough space for 2097152KB object heap
-
启动tomcat,报错 Error occurred during initialization of VM Could not reserve enough space for object
-
Error occurred during initialization of VM Could not reserve enough space for ob
-
Error occurred during initialization of VM Could not reserve enough space for 2097152KB object heap