How to increase STS (Spring Tool Suite) memory size?

Deadly 提交于 2019-12-23 09:48:16

问题


I am trying to increase heap size (memory) for the spring tool suite as I am getting out of memory.

If I increase from Xmx from 768m to 1024m I get the error "Failed to Create Java Virtual Machine".

If I revert Xmx to 768m it works fine but I get OOM (Out of Memory). I have STS 2.9.2. OS is win7.

This is currently what I have in sts.ini at the moment.

-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.2.R36x_v20101222
-product
com.springsource.sts.ide
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
384M
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms256m
-Xmx1024m
-Xss1m
-XX:PermSize=256m
-XX:MaxPermSize=1024m

what should I change? Please advise.


回答1:


-startup
plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.401.v20161122-
1740
-product
org.springsource.sts.ide
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Xmx1024m

You should change only Xmx. Here I am using Xmx1024m means STS is assigned with 1 GB Ram And Xmx4G means 4GB RAM. You can check the heap status as

Open sts in Windows menu select Preferences then from General tab mark show heap status option.



来源:https://stackoverflow.com/questions/13041147/how-to-increase-sts-spring-tool-suite-memory-size

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!