eclipse MyEclipse 尚不支持 1.7 编译器合规级别
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14134709/
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
1.7 compiler compliance level is not yet supported in MyEclipse
提问by Bahramdun Adil
I would like to use the new switch statement with Strings in it that is possible in Java 1.7. e.g.
我想在 Java 1.7 中使用带有字符串的新 switch 语句。例如
String str = "string";
switch (str) {
case "string" :
// do something
break;
}
And I installed JDK 7 and changed the Preferences to use jre7 but i am unable to change the compiler compliance level to 1.7 from inside eclipse, the properties dialog has a drop down that goes only up to 1.6. Restarted the tool but did not see any changes. Now what should i do to udate the JDK to 1.7 in Eclipe Thanks in adcance!!
我安装了 JDK 7 并将首选项更改为使用 jre7,但我无法从 eclipse 内部将编译器合规性级别更改为 1.7,属性对话框有一个下拉菜单,只能达到 1.6。重新启动该工具,但没有看到任何变化。现在我应该怎么做才能在 Eclipe 中将 JDK 更新为 1.7 谢谢提前!
回答by Aaron Digulla
This is odd; MyEclipse 10.7 should support Java 7: MyEclipse Java 7 Support
这很奇怪;MyEclipse 10.7 应该支持 Java 7:MyEclipse Java 7 Support
There us a detailed forum postwhich says:
我们有一个详细的论坛帖子,上面写着:
MyEclipse 10.0.1is now publicly available
...
1) Built on Eclipse 3.7.1, now supports Java 7.
MyEclipse 10.0.1现已公开发布
...
1) 基于Eclipse 3.7.1,现在支持 Java 7。
回答by Kevin Bigler
Oh and as for your java question in you command line type java -version and that will probably answer your question. Find out what version of Java is installed and I think you need Indigo if you're going to use Java 7, I feel like I had an issue with that on Windows but I don't remember specifically. Update Java and Eclipse to the latest versions and you should be good to go. If you're running Linux I just stuck with Java 6.
哦,至于你在命令行输入 java -version 的 java 问题,这可能会回答你的问题。找出安装的 Java 版本,如果您要使用 Java 7,我认为您需要 Indigo,我觉得我在 Windows 上遇到了问题,但我不记得具体了。将 Java 和 Eclipse 更新到最新版本,您应该就可以开始使用了。如果你运行的是 Linux,我只是坚持使用 Java 6。