[JAVA] Salesforce data loader released with Zulu OpenJDK 11

Overview

Salesforce's data loader was previously built with Oracle Java 8, but with the release of Ver.45, it is now built with "** Zulu OpenJDK 11 **". Since it is published on GitHub below, I tried to introduce it immediately. https://github.com/forcedotcom/dataloader/releases/tag/v45.0.0

What is Zulu? https://qiita.com/nowokay/items/edb5c5df4dbfc4a99ffb Zulu is an OpenJDK build provided by Azul Systems. Azul Systems is a company that supports OpenJDK and belongs to former Oracle Simon Ritter. Since Customer also has Microsoft, maybe Microsoft Azure is also using zulu.

procedure

Download Dataloader

https://github.com/forcedotcom/dataloader/releases/download/v45.0.0/dataloader_mac.zip image.png At the moment, the dmg has not been published yet and you need to run the jar directly to start it. If you run it in Java 8 without Zulu, you will get the following error.

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/salesforce/dataloader/process/DataLoaderRunner has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)

Install Zulu Open JDK

https://www.azul.com/downloads/zulu image.png

image.png

Update PATH (JAVA_HOME)

The Java 8 path should be set, so update with the Zulu path.

export JAVA_HOME=/Library/Java/JavaVirtualMachines/<zulu_package>/Contents/Home/

Start from command

If you are on a Mac, you can start Dataloader from the following command.

java -XstartOnFirstThread -jar target/dataloader-xx.0-uber.jar

image.png

Summary

I don't think there will be any major changes just because the JDK has changed, but if you want to work in production, you should switch to the new version as soon as possible just in case.

Recommended Posts

Salesforce data loader released with Zulu OpenJDK 11
Install Java 8 (OpenJDK: Zulu Community) on macOS with Homebrew
Install OpenJDK8 with RPM
Using Pair with OpenJDK