function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Katherine Claire RobertoKatherine Claire Roberto 

Windows Command Line Interface Issue

Hi All, 

I'm trying to explore Data Loader to Use the Bulk API. I am following the Data Loader Guide and when I try to run encrypt.bat -g sometext I am having an error like this.


C:\Users\User\dataloader\bin>encrypt -g myKey
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/salesforce/dataloader/security/EncryptionUtil 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(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)

What are the ways to solve this issue?

Thank you so much in advance.
Best Answer chosen by Katherine Claire Roberto
Alain CabonAlain Cabon
@Katherine Claire Roberto 

Exception in thread "main" java.lang.UnsupportedClassVersionError: it is a problem of java version (command: java -version ).

"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"
  • 52 = Java 8
  • 53 = Java 9
  • 54 = Java 10
  • 55 = Java 11
 Java SE Development Kit 11.0.3: downloads at the bottom of the page
https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.html 

You need this version java 11. The JRE would be sufficient but the JDK included the JRE automatically.

All Answers

Alain CabonAlain Cabon
@Katherine Claire Roberto 

Exception in thread "main" java.lang.UnsupportedClassVersionError: it is a problem of java version (command: java -version ).

"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"
  • 52 = Java 8
  • 53 = Java 9
  • 54 = Java 10
  • 55 = Java 11
 Java SE Development Kit 11.0.3: downloads at the bottom of the page
https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.html 

You need this version java 11. The JRE would be sufficient but the JDK included the JRE automatically.
This was selected as the best answer
Katherine Claire RobertoKatherine Claire Roberto
Wow. It worked! Thank you so much!!
Katherine Claire RobertoKatherine Claire Roberto
Hi @Alain Cabon,

I am now having a different error can you help me again with this one? I'm still following the Data Loader Guide documentation.
Thank you so much in advance!


C:\Users\User\dataloader\bin>encrypt -e myHOkey C:\Users\User\dataloader\myHOkey.txt
Error setting the key from file: C:\Users\User\dataloader\myHOkey.txt, error: Failed to open file: C:\Users\User\dataloader\myHOkey.txt

 
Alain CabonAlain Cabon
Hi Katherine, 

There is perhaps an error in the path for the "User" that should be replaced by your real user name in this folder.

C:\Users\<YOUR USER NAME>\dataloader\myHOkey.txt