即使在修复兼容性后,也无法修复不支持的major.minor版本52.0 [英] Can't fix Unsupported major.minor version 52.0 even after fixing compatibility

查看:119
本文介绍了即使在修复兼容性后,也无法修复不支持的major.minor版本52.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在另一台机器上运行我的java .jar时,我收到错误

When I try running my java .jar on another machine I get the error


不支持的major.minor版本52.0

Unsupported major.minor version 52.0

我使用jdk 1.6编译我的程序,我的机器(单独一个)安装了Java 7。

I compiled my program using the jdk 1.6 and my machine (separate one) has java 7 installed.

这是我的机器正在运行的java版本:

This is the java version my machine is running:

以下是我的IDE中的设置(Eclipse Lunar)

Here are the settings in my IDE (Eclipse Lunar)

< img src =https://i.stack.imgur.com/5b4uc.pngalt =eclipse编译器设置>

为什么我仍然收到不支持的错误? / strong>

Why am I still getting an unsupported error?

我确实检查了我的运行配置并将其更改为jre6,但是当我做甚么时,我甚至无法在IDE中运行我的程序。

I did check my run configuration and change it to jre6, but when I do I can't even run my program in the IDE.

注意:我希望我的程序与jdk 6一起工作,如果这是不可能的jdk 7。

Note: I would like my program to work with jdk 6, if that is not possible jdk 7.

我的班级路径:

推荐答案

我同意chrylis:你相信你改变了项目的合规性设置,但可能你没有。

I agree with chrylis: you believe you changed your project's compliance settings but probably you didnt.

右键单击您的项目:


  • Java / Build Path:Go到图书馆选项卡,并确保您真正使用jre6

  • Java /编译器:确保您选择了1.6合规性

顺便说一句,你可以告诉eclipse jre8是1.6遵从点击Window / Preferences / Java / Installed JREs / Execution Environment,并在左边的面板中选择执行环境,JavaSE-1.6和兼容JRE的面板,jre8

By the way you can "tell" eclipse that jre8 is 1.6 compliance clicking on Window/Preferences/Java/Installed JREs/Execution Environment and selecting in the left panel, Execution Environments, JavaSE-1.6 and in the Compatible JRE's panel, jre8

这篇关于即使在修复兼容性后,也无法修复不支持的major.minor版本52.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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