问题描述
由于内存不足,我正在尝试增加spring工具套件的堆大小(内存).
I am trying to increase heap size (memory) for the spring tool suite as I am getting out of memory.
如果我从Xmx从768m增加到1024m,则会出现错误无法创建Java虚拟机".
If I increase from Xmx from 768m to 1024m I get the error "Failed to Create Java Virtual Machine".
如果我将Xmx还原为768m,它可以正常工作,但我得到OOM(内存不足).我有STS 2.9.2.操作系统是win7.
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.
这是我目前在sts.ini中拥有的.
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.
推荐答案
-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
您仅应更改Xmx.我在这里使用Xmx1024m表示STS被分配了1 GB RamXmx4G表示4GB RAM.您可以将堆状态检查为
You should change only Xmx.Here I am using Xmx1024m means STS is assigned with 1 GB RamAnd Xmx4G means 4GB RAM.You can check the heap status as
在Windows菜单中打开sts,选择偏好设置",然后从常规"选项卡标记显示堆状态选项.
Open sts in Windows menu select Preferences then from General tab mark show heap status option.
这篇关于如何增加STS(Spring工具套件)的内存大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!