Java – Help changing OSX Eclipse Java Heap allocation

eclipseheap-memoryjavamacosmemory

I need to increase the heap allocation but I think I am missing a step, I follow this instructions http://wiki.eclipse.org/Eclipse.ini but the ini file is different from mine, this is what I get

-startup
../../../plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx_1.1.2.R36x_v20101019_1345
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
-vmargs
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx1536m
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-XX:MaxPermSize=256m

I change line -Xmx1536m but still get the out of memory problem, any ideas what else I need to setup? I have the latest 64bit Eclipse IDE and running on OSX 10.6.7

Thanks

Best Answer

In your comments you clarified that you're trying to increase the memory for an application you're running in Eclipse. What you've been trying increases the memory for Eclipse itself. To increase the memory for an application you're running in Eclipse to 1536m follow these steps:

  1. Go to Run > Run Configurations...
  2. Select your Java Application
  3. Go to the Arguments tab
  4. Add -Xmx1536m to the your VM arguments
Related Topic