Note that the article you link says that:
Newer Dataloader versions (45 and up) that use Zulu Java manage heap size differently and should not need to do this.
Are you certain that this is what you need to do? What are you doing that's bringing a memory error that you believe will be resolved by this?
That said, it's straightforward enough to pass those memory allocation options in the batch file. The -Xmsn
and -Xmxn
options to set the minimum and maximum size of the memory allocation are also available in OpenJDK:
-Xmsn Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append
the letter k or K to indicate kilobytes, or m or M to indicate
megabytes. The default value is chosen at runtime based on system
configuration. For more information, see HotSpot Ergonomics @
http://docs.oracle.com/javase/7/docs/technotes/guides/vm/gc-ergonomics.html
Examples:
-Xms6291456
-Xms6144k
-Xms6m
-Xmxn Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the
letter k or K to indicate kilobytes, or m or M to indicate megabytes.
The default value is chosen at runtime based on system configuration.
For more information, see HotSpot Ergonomics @
http://docs.oracle.com/javase/7/docs/technotes/guides/vm/gc-ergonomics.html
Examples:
-Xmx83886080
-Xmx81920k
-Xmx80m
So, use VS Code (or Notepad or other text editor) to open the .bat file that the desktop shortcut points to (C:\Users\[username]\dataloader\[API version]\dataloader.bat by default). Find the line that runs Java with the JAR file:
"%ZULU_JAVA_HOME%\java" -jar dataloader-48.0.0-uber.jar salesforce.config.dir=configs
and add your memory allocation options before the -jar
parameter:
"%ZULU_JAVA_HOME%\java" -Xms1024m -Xmx1256m -jar dataloader-48.0.0-uber.jar salesforce.config.dir=configs
Save the batch file, and run Dataloader from the desktop shortcut.