Eclipse.ini settings don't seem to help me resize the maximum heap size

Here is my eclipse.ini file:

-startup plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519 -product org.eclipse.epp.package.java.product --launcher.XXMaxPermSize 256M -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m -vmargs -Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx256m 

Default. However, I have an application that seems to crash with a 64 MB heap size. I print the heap size (in bytes) every few seconds until it works, and here is the last output:

66650112 An exception occurred in the main thread java.lang.OutOfMemoryError: Java heap space on java.lang, etc.

I am using Sun java. Is there any other place where I need to set the maximum ram available for java?

+1
source share
2 answers

You seem to be saying that your application crashes with an out-of-memory error, in which case you must provide JVM args application parameters heap size, not eclipse

they look like this:

 -Xms256M;-Xmx512M 
+2
source

These settings are valid for the eclipse platform itself. An application launched from eclipse lives in a separate JVM and has a default heap size of 64 MB.

Easy to solve: go to Run your application configuration , select the Arguments tab and add VM parameters, for example -Xmx128M to VM arguments .

+5
source

All Articles