Page 1 of 1

Error running OPE with Java 18

Posted: Thu Feb 22, 2024 8:15 pm
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.

Re: Error running OPE with Java 18

Posted: Fri Feb 23, 2024 9:07 am
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