class 文件版本 57.0,此版本的 Java Runtime 仅识别高达 52.0 的 class 文件版本 [英] class file version 57.0, this version of the Java Runtime only recognizes class file versions up to 52.0

查看:46
本文介绍了class 文件版本 57.0,此版本的 Java Runtime 仅识别高达 52.0 的 class 文件版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题很像

现在,我使用 eclipse mvn install 创建了一个 fat-JAR 并将 fat-JAR 复制到 Computer2.当我在 Computer2 上运行 JAR 文件时,出现以下错误

在 Computer2 上,我安装了 JDK 13.0.1 并设置了环境变量.我按照 C:\Program Files (x86)\Common Files\Oracle\Java\javapath"://stackoverflow.com/questions/58125830/has-been-compiled-by-a-more-recent-version-of-the-java-runtime-class-file-versi">这个类似的问题.

任何解决此问题的想法/建议.

解决方案

问题是一些应用程序自带 JRE,有时安装的 JDK 在环境路径中的优先级较低.现在有两个选择:

卸载其他具有自己的 JDK/JRE 的应用程序.有时无法删除其他应用程序,这就是我的情况.所以我把自己安装的 JDK 移到了环境路径中更高的优先级.

环境变量的图片在这个类似问题上传.

This question is very similar to this question except the environment and the way I am getting this error. I also tried solution provided in the answer but no luck.

I am using Eclipse for developing a Spring Boot Application on Computer1. The JDK/JRE version on Computer1 and Eclipse is JDK 13.0.1.

Now, I created a fat-JAR using eclipse mvn install and copied fat-JAR to Computer2. When I run the JAR file on Computer2 then I get the following error

On Computer2 I have JDK 13.0.1 installed and environment variable set. I removed the path "C:\Program Files (x86)\Common Files\Oracle\Java\javapath" from my Environment path as suggested by this similar question.

Any idea/suggestion how to resolve this issue.

解决方案

The issue was that some applications come with their own JRE and sometimes the installed JDK appears at lower priority level in environment path. Now there are two options:

Uninstall the other application which has their own JDK/JRE. Sometimes it is not possible to remove the other application, which was my case. So I moved JDk installed by me to higher priority level in environment path.

The image for environment variable is uploaded at this similar question.

这篇关于class 文件版本 57.0,此版本的 Java Runtime 仅识别高达 52.0 的 class 文件版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆