更改 Eclipse 所需的 Java 版本

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25671774/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 21:56:51  来源:igfitidea点击:

Changing required Java version for Eclipse

javaeclipseini

提问by meanderingmoose

My friend was having trouble running Eclipse Luna on his Mac running 10.6.8. Whenever he ran Eclipse, it would display an error about requiring Java 7. But, he couldn't install Java 7 due to his older OS.

我的朋友在运行 10.6.8 的 Mac 上运行 Eclipse Luna 时遇到问题。每当他运行 Eclipse 时,它​​都会显示一个关于需要 Java 7 的错误。但是,由于他的操作系统较旧,他无法安装 Java 7。

After running through some strategies for solving this issue online, I failed to find a solution. So, I decided to open up the eclipse.inifile and changed this line:

在网上运行了一些解决此问题的策略后,我未能找到解决方案。所以,我决定打开eclipse.ini文件并更改这一行:

-Dosgi.requiredJavaVersion=1.7

to this:

对此:

-Dosgi.requiredJavaVersion=1.6

Then, Eclipse ran. It didn't run into an error yet.

然后,Eclipse 运行。它还没有遇到错误。

Is this an issue of Eclipse requiring a more recent Java version than needed, or will it start to run into problems at some point?

这是 Eclipse 的问题,需要一个比需要更新的 Java 版本,还是会在某个时候开始遇到问题?

采纳答案by greg-449

The decision to require Java 1.7 is described in great detail in Eclipse bug 423734

Eclipse 错误423734 中详细描述了需要 Java 1.7 的决定

The primary reason initially was that Java 1.6 is now end of life and is no longer being maintained.

最初的主要原因是 Java 1.6 现在已经结束并且不再维护。

Since the decision was taken some packages are using Java 1.7 code, there is a list herealthough this may have expanded since.

由于做出了决定,一些包使用 Java 1.7 代码,这里有一个列表尽管此后可能已经扩展。