Problem with increasing Java heap size in Eclipse
I have a problem with error saying ERROR: 'Java heap space'
. I followed these instructions to increase the heap size for Eclipse, but it开发者_C百科 doesn't work. Eclipse seems to be ignoring the given values. My eclipse.ini
file looks like this:
-startup
../../../plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.1.R36x_v20100810
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-XX:MaxPermSize=512m
-Xms512m
-Xmx1024m
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.ecli
pse.swt.internal.carbon.smallFonts
The Eclipse version is 3.6.1 running on Mac.
Any ideas what might be wrong?
Are you sure you are configuring parameters for your application execution and not for Eclipse itself?
I usually configure heap size in the Run | Run Configuration dialog.
Try to supply -vmargs directly to Eclipse executable instead of eclipse.ini file.
eclipse -vmargs -Xms512m -Xmx730m
There is a bug in Eclipse, that prevents it from supplying "vmargs" clause of eclipse.ini to JVM.
Humm... -XX:MaxPermSize=512m -Xms512m -Xmx1024m all looking fine. When are you having this error? At Startup? Can you try switching JVM or downloading the 32 bit version? When building? Try this guide to give ANT more memory: http://ericfickes.com/2008/10/osx-flexbuilder-java-heap-space-error/ On the App Server / Servlet Container? Increase it's heapsize and permgen space.
Eclipse.ini is for eclipse itself not for running applications. For that use a run configuration to set the start parameters.
One more note: java on MacOSX doesn't have the XX:MaxPermSize or any another XX flags.
To those who get the same error under Eclipse, try to restore cache files (if they were removed accidentally in WAR folder ), this way I solve the same problem under my Eclipse' project. note: I don't think there is a link between Memory allowed to Eclipse and memory for App.
精彩评论