I am trying to change and increase the default -Xmx768m to -Xmx1024 in STS.ini. However, on startup I get an error 开发者_如何转开发saying "Failed to create the JVM".
If I revert it back to 768 it works fine. Any idea as to what am I doing wrong and how can I improve the performance of STS?
Here is the configuration
-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
256M
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms256m
-Xmx768m
-XX:MaxPermSize=256m
You could try to attach the jvisualvm profiler tool (can be found in the bin folder of your jdk). If anything the tool will give you info about the jvm and its resource usage.
Be careful to use the tool that comes with the jdk you use for STS (most likely the one in JAVA_HOME but not necessarily).
Mind you that on a 32bit OS the JVM will never be able to get more than 1.6 GB of memory. If you have other software already in that same JVM as STS, jvisualvm will list them in the left side panel.
精彩评论