Jasper Studio编译报告问题 - 不支持的类文件主要61
尝试使用Goovy语言编译JASPER报告JRXML文件,我在某些文件上遇到了错误。
Eclipse版本:2022-03 Jasper Studio版本:6.19
错误消息:错误!源单元中的阶段“语义分析”计算器中的例外情况_.....'不支持的类文件专业版本61
请参见下面的答案。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
问题是由于 Java 17 ,但不是安装在计算机上的Java,而是启动Eclipse时使用的 Java插件的版本。
要检查Eclipse使用的版本,请在Eclipse文件夹中打开Eclipse.ini文件。
我的有:
要修复它,您需要使用Eclipse JRE的较早版本。
我下载了版本16.0.2完整的版本来自: https://download.eclipse.org/justj/justj/www/www/download.eclipse.eclipse.org.php?file=jres/16/updates/release/release/release/16.0.0.2/plugins
下载后:
复制下载到/eclipse/plugins文件夹的JAR文件
解开JAR(eclipse/plugins/org.eclipse.justj.justj.openjdk.hotspot.jre.jre.linux.x86_64_16.64_16.2.2.v20210210721-1149中)
重新启动日食。
注意:我确实将旧的eclipse.ini保存为eclipse.ini.17,以防万一我需要回滚至Java版本17。
更新
,使用Eclipse版本2022-12, Java 17必须开始。
我修复了它,以定义用于用于Jasper报告的JRE。转到窗口 /偏好 / jasperstudio /属性:
用于属性net.sf.jasperreports.compiler.classpath
set值为:/home/csimon/eclipse/eclipse/plugins/org.eclipse.equinox.equinox.launcher_1.6.400.v20210921924-0641.Jar
Restart Eclipse
剩余的Eclipse becort Leagral nestagenc.jar =“ groovy”到语言=“ java”
Problem is due to Java 17, but not the Java installed on the computer, but the version of the Java plugin used when starting Eclipse.
To check the version used by Eclipse, open the eclipse.ini file in Eclipse folder.
Mine had:
To fix it, you need to use an earlier release of Eclipse JRE.
I downloaded the version 16.0.2 full from : https://download.eclipse.org/justj/www/download.eclipse.org.php?file=jres/16/updates/release/16.0.2/plugins
Once downloaded:
Copy the JAR file downloaded to /eclipse/plugins folder
Unzip the jar (under eclipse/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.linux.x86_64_16.0.2.v20210721-1149 in my case)
Modify the eclipse.ini accordingly:
Restart Eclipse.
Note: I did save the old eclipse.ini as eclipse.ini.17 just in case I need to rollback to Java version 17.
UPDATE
With Eclipse version 2022-12, Java 17 is required to start.
I fixed it defining the JRE to use for Jasper Report. Go to Window / Preferences / JasperStudio / Properties:
For property net.sf.jasperreports.compiler.classpath
Set value to: /home/csimon/eclipse/plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar
Restart Eclipse
Remaining reports with error were fixed by changing language="groovy" to language="java"
作为解决方法,您可以从
我在eclipse中有相同的错误消息。使用工作室开箱即用,没有错误消息。
As a workaround you can download and use Jaspersoft Studio from https://community.jaspersoft.com/project/jaspersoft-studio/releases
I had the same error message in Eclipse. Using Studio worked out of the box without error message.