Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Out of Memory Error in BlackBerry Java Plug-in for Eclipse or the BlackBerry Java Development Environment

by Retired on ‎06-18-2010 04:23 PM - edited on ‎12-20-2010 11:43 AM by BlackBerry Development Advisor (4,820 Views)

The BlackBerry® Java® Plug-in for Eclipse® and the BlackBerry® Java® Development Environment can potentially run out of memory when attaching to BlackBerry smartphones or simulators, particularly newer ones. If you encounter this error, you must increase the heap size of the Java Virtual Machine (JVM) using the –Xmx flag with a larger amount of memory. For example, -Xmx1024M. You can do this by adding an argument to your Eclipse® shortcut, modifying Eclipse.ini or, modifying the batch file used to invoke the BlackBerry JDE.


BlackBerry Java Plug-in for Eclipse:

To give the JVM more heap space in Eclipse, pass the following argument to Eclipse when it is launched:

-vmargs –Xmx1024M


To pass the argument to Eclipse, complete the following tasks:

  1. Locate the shortcut used to launch Eclipse. For example, Start > Programs > Eclipse
  2. Right-click on the shortcut and select Properties.
  3. Change the Target box and add those arguments on to the end.

For example, "C:\Program Files\Eclipse\eclipse.exe" -vmargs -Xmx1024M


You can also modify the Eclipse.ini file, found in Eclipse’s main directory, by adding the –Xmx flag there. For more information on modifying the Eclipse.ini file, search http://wiki.eclipse.org/  for terms such as “How do I increase the heap size available to Eclipse?”


BlackBerry Java Development Environment:

To modify the BlackBerry JDE 5.0 complete the following steps:

1.)   Select Start > Research In Motion > BlackBerry JDE 5.0.

2.)   Right click the JDE and select Edit. This should open an instance of Notepad with the following entry: start javaw -Xmx256M -DRIM_RUNTIME=..\lib -DRIM_BIN=..\bin -jar IDE.jar

3.)   Modify the entry to the following: start javaw -Xmx1024M -DRIM_RUNTIME=..\lib -DRIM_BIN=..\bin -jar IDE.jar

4.)   Save the file.


To modify a different BlackBerry JDE, change that batch file instead. The important part is to add or change the –Xmx argument to a larger value, such as -Xmx1024M (which will give the JVM 1024MB of stack space). 

Users Online
Currently online: 38 members 6,136 guests
Please welcome our newest community members: