简体   繁体   English

在Oracle JDK 8下运行Android Bundle / Eclipse Juno时没有Java 1.8编译器合规性级别

[英]No Java 1.8 compiler compliance level when running Android Bundle/Eclipse Juno under Oracle JDK 8

I am using Android Bundle/Eclipse Juno under Oracle JDK 8 as the default Java on my Fedora 21 KDE box. 我在Oracle JDK 8下使用Android Bundle / Eclipse Juno作为Fedora 21 KDE盒子上的默认Java。 There is no Java compiler compliance level 1.8 in settings. 设置中没有Java编译器合规性级别1.8。 When I opened the Eclipse compiler compliance level was set to 1.4 and it goes up to 1.8. 当我打开Eclipse编译器时,合规性级别被设置为1.4并且它上升到1.8。 Is there something wrong here? 这里有什么问题吗?

Eclipse juno doesn't magically gain Java 1.8 compiler support because you install Java 8. Juno was released in June 2012 while Java 8 was released March 2014 . Eclipse juno并没有神奇地获得Java 1.8编译器支持,因为你安装了Java 8.Juno于2012年6月发布,而Java 8于2014年3月发布。 The first version of eclipse with Java 8 support was Kepler (through an after-release JDT update); 支持Java 8的eclipse的第一个版本是Kepler (通过发布后的JDT更新); Luna supports Java 8 out of the box. Luna支持Java 8开箱即用。

In addition to what Elliot wrote in his Answer , you won't be able to run Java 8 code on Android. 除了Elliot在他的答案中写的内容之外,您将无法在Android上运行Java 8代码。 Android platforms only support linguistic features up to Java 7, and even then the support is not complete. Android平台仅支持Java 7之前的语言功能,即使这样,支持也不完整。

Reference: 参考:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM