英文:
jaspersoft Studio not wok with JDK 11 or JDK 15
问题
我们正在使用Jasper来生成报表。
在使用Jasper Studio进行报告编写时,我们还拥有一些定制的数据源类。
这些类是在Java 11中编译的,似乎与Jasper Studio不兼容。
我们是否有兼容Java 11的Jasper Studio版本?
或者我们是否有一种方法可以设置Jasper Studio的环境,使其与JDK 11或JDK 15一起工作?
错误信息:
> net.sf.jasperreports.engine.JRException: java.lang.UnsupportedClassVersionError: com/numidia_technology/OrderFactory已由更高版本的Java Runtime编译(类文件版本为55.0),而此版本的Java Runtime仅识别高达52.0的类文件版本。
英文:
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
答案1
得分: 1
在Jasper Studio.ini文件中,将被注释的行替换为指向所需jdk的bin文件夹的绝对路径:
-vm
C:\Program Files\Java\jdk-17\bin
features/jre.win32.win32.x86_64.feature_11.0.8/adoptopenjdk_jre/bin
这将阻止Jasper Studio使用其默认的jdk版本。还要记得在项目中使用相同的jdk版本 - 检查您的pom.xml文件的java版本以及Maven的source/target标签。
获取更多信息请查看:
java类版本号
Mac/Windows:jasper社区问题解决方案
英文:
In the Jasper Studio.ini file replace the commented line with absolute path pointing to the desired jdk's bin folder:
-vm
C:\Program Files\Java\jdk-17\bin
# 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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论