Skip to content
Advertisement

jaspersoft Studio not wok with JDK 11 or JDK 15

We are using Jasper for our Reporting.

We also have some customized classes for datasources which can be used in Jasper Studio while Authoring Report.

These classes are compiled in Java 11.which seems not compatible with Jasper Studio.

Do we have Java 11 Compitabli Jasper Studio ?

Or do we have a method where we can set environment for Jasper Studio to work with JDK11 or JDK15

Error:

net.sf.jasperreports.engine.JRException: java.lang.UnsupportedClassVersionError: com/numidia_technology/OrderFactory 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

enter image description here

Advertisement

Answer

In the Jasper Studio.ini file replace the commented line with absolute path pointing to the desired jdk’s bin folder:

-vm
C:Program FilesJavajdk-17bin
# features/jre.win32.win32.x86_64.feature_11.0.8/adoptopenjdk_jre/bin

This will prevent jasper studio to use it’s default set jdk version. Also keep in mind to use the same jdk version for your project – check your pom.xml files java version and maven source/target tags.

For more information check : java class version numbers

Mac/Windows: jasper community problem solution

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement