Kepler doesn't have 1.8
compliance support, so you have to update to a newer version of Eclipse (like Juno).
When you do, you have to make sure that you have properly pointed the JDK installation directory in Eclipse. You can navigate to Window
→ Preferences
→ Java
→ Installed JREs
, add the JDK8 environment (and select it as default, as you don't have any other, since you have deleted 1.7 one).
Then, when you navigate to Window
→ Preferences
→ Java
→ Compiler
, you should be able to select 1.8
as "Compliance level", as shown here:
Eclipse Kepler不支持Java8。您需要转到Eclipse的当前版本(Eclipse Mars)以获得Java 8的全面支持。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.