Jasper Studio编译报告问题 - 不支持的类文件主要61

发布于 2025-01-30 08:35:52 字数 171 浏览 3 评论 0 原文

尝试使用Goovy语言编译JASPER报告JRXML文件,我在某些文件上遇到了错误。

Eclipse版本:2022-03 Jasper Studio版本:6.19

错误消息:错误!源单元中的阶段“语义分析”计算器中的例外情况_.....'不支持的类文件专业版本61

请参见下面的答案。

Trying to compile a Jasper Report jrxml file using Goovy language, I got an error on some files.

Eclipse version: 2022-03
Jasper Studio version: 6.19

Error message: BUG! exception in phase 'semantic analysis' in source unit 'calculator_.....' Unsupported class file major version 61

See fix in answer below.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

但可醉心 2025-02-06 08:35:52

问题是由于 Java 17 ,但不是安装在计算机上的Java,而是启动Eclipse时使用的 Java插件的版本

要检查Eclipse使用的版本,请在Eclipse文件夹中打开Eclipse.ini文件。

我的有:

...
-vm
plugins/org.eclipse.justj.openjdk.hotspot.jre.full.linux.x86_64_17.0.2.v20220201-1208/jre/bin
...

要修复它,您需要使用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

下载后:

  1. 复制下载到/eclipse/plugins文件夹的JAR文件

  2. 解开JAR(eclipse/plugins/org.eclipse.justj.justj.openjdk.hotspot.jre.jre.linux.x86_64_16.64_16.2.2.v20210210721-1149中)

  3.   -vm
    插件/org.eclipse.justj.openjdk.hotspot.jre.full.linux.x86_64_16.0.2.v20210721-1149/jre/bin
     

重新启动日食。

注意:我确实将旧的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:

...
-vm
plugins/org.eclipse.justj.openjdk.hotspot.jre.full.linux.x86_64_17.0.2.v20220201-1208/jre/bin
...

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:

  1. Copy the JAR file downloaded to /eclipse/plugins folder

  2. Unzip the jar (under eclipse/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.linux.x86_64_16.0.2.v20210721-1149 in my case)

  3. Modify the eclipse.ini accordingly:

    -vm
    plugins/org.eclipse.justj.openjdk.hotspot.jre.full.linux.x86_64_16.0.2.v20210721-1149/jre/bin
    

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"

祁梦 2025-02-06 08:35:52

作为解决方法,您可以从

我在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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文