Error running OPE with Java 18

Having trouble installing Oxygen? Got a bug to report? Post it all here.
ms2art2
Posts: 18
Joined: Tue Jan 14, 2020 6:44 pm

Error running OPE with Java 18

Post by ms2art2 »

When I upgrade to Oxygen Publishing Engine 26, I get this error in my Jenkins console:

java.lang.UnsupportedClassVersionError: org/dita/dost/invoker/MainWithCPWildcardExpansion has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Right now I'm using Java 18, which ought to be okay, according to your prerequisite doc:

java -version
openjdk version "1.8.0_282"
OpenJDK Runtime Environment (build 1.8.0_282-b08)
OpenJDK 64-Bit Server VM (build 25.282-b08, mixed mode)

Any idea what's up?

FYI, I've also tried getting OPE to use JDK 21 instead, but I'm not sure I'm doing that right. That JDK is at /opt/OpenJDK_21.0.1/bin, and I've tried setting the ENV environment variable in my Jenkins script, and with JAVA_HOME, with no luck. Any thoughts on that?

Thanks.
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Error running OPE with Java 18

Post by Radu »

Hi,
Right now I'm using Java 18, which ought to be okay, according to your prerequisite doc:
java -version
openjdk version "1.8.0_282"
No, you are actually using Java 1.8 and not 18.
You can open in a text editor the "DITA-OT/bin/dita" to see how it looks for the Java executable, I think if you have the env variable "JAVA_HOME" set to the Java home folder, this should be enough.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply