You can resolve or prevent 'Java Heap Space' errors by lowering the batch size setting in Data Loader.
Alternatively, it may be possible to increase the java heap size for the Data Loader startup command. The details below assume that Data Loader is installed in the default location. If Data Loader is installed in a different folder, then the startup command below will look differently.
a) If you have Data Loader shortcut on the Desktop, right-click the shortcut, select properties from the menu that opens, and in the target field modify it to look like this:
"C:\Program Files (x86)\salesforce.com\Data Loader\Java\bin\javaw.exe" -Xms1024m -Xmx1256m -Dappdata.dir="C:\Users\<user>\AppData\Roaming" -jar "C:\Program Files (x86)\salesforce.com\Data Loader\dataloader-26.0.0-uber.jar"
where <user> is the username of the User of the machine.
For Data Loader Version 37 on Windows 7, the path might look like:
"C:\ProgramData\Oracle\Java\javapath\javaw.exe" -Xms1024m -Xmx1256m -Dappdata.dir="C:\ProgramData" -jar "C:\Program Files (x86)\salesforce.com\Data Loader\dataloader-37.0.0-uber.jar"
b) If you do not have Data Loader shortcut on the Desktop, then click on Start Button>All Programs>salesforce.com>Data Loader and right click on the Data Loader icon there, select Properties from the popup menu that opens, and follow the steps described under a).
It might be required to go through several iterations of the steps above to find the right heap size. When setting the heap size the total amount of memory present on the system must be taken into account. Also if the system run 32 bit OS, then the heap size cannot be bigger than 2 GB. Please refer to the Java documentation for more details.
000385819

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.