Question

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 stuff. However, I have an app that appears to be crashing with 64 mb of heap size. I'm printing out the heap size (in bytes) every few seconds until it crashes, and here's the last output:

66650112 Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.lang etc

I'm using Sun's java. Is there another place I need to set the maximum ram available to java?

Was it helpful?

Solution

You seem to say your app crashes with an out of memory error, in this case you should provide JVM args to the app settings the heap size, not to eclipse

they look like this:

-Xms256M;-Xmx512M

OTHER TIPS

These settings are valid for the eclipse platform itself. An application, that's started from within eclipse lives in a separate JVM and that has a default heap size of 64 MB.

It's easy to solve: navigate to the Run Configuration of your application, choosen the Arguments tab and add the VM parameters, like -Xmx128M to the VM arguments field.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top