Eclipse 4.3.2与Java 8补丁不能识别源级1.8 [英] Eclipse 4.3.2 with Java 8 patches doesn't recognize source level 1.8

查看:419
本文介绍了Eclipse 4.3.2与Java 8补丁不能识别源级1.8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Eclipse 4.3.2和针对Java 8的补丁,随着m2e和Subclipse,完全更新到最新版本的所有东西。



我进入了Maven POM的项目,并将maven-compiler-plugin更改为: / p>

 < groupId> org.apache.maven.plugins< / groupId> 
< artifactId> maven-compiler-plugin< / artifactId>
< version> 2.5.1< / version>
< configuration>
< source> 1.8< / source>
< target> 1.8< / target>

我更新了我所有的Maven项目,试图做一个完整的清理和构建。错误遍布整个地方。忽略内部编译器错误的时刻,我最看到的错误是:

 语法错误,静态导入仅在源级别为1.5或更高

我正在运行Java 1.8 ---为什么我收到此消息?是m2e责怪吗maven-compiler-plugin?或者Eclipse Java 1.8支持根本没有准备好黄金时段?

解决方案

显然m2e还不支持Java 8。 p>

根据Eclipse 错误420848 ,您必须从 http://download.eclipse中安装m2e 1.5 M6。 org / technology / m2e /里程碑/ 1.5 软件站点。我做到了这一点,源级别1.5的错误消失了。


I'm using Eclipse 4.3.2 with the patches for Java 8 from, along with m2e and Subclipse, completely updated to the latest versions of everything.

I went into the Maven POMs for our project and changed the maven-compiler-plugin to:

<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
    <source>1.8</source>
    <target>1.8</target>

I updated all my Maven projects tried to do a complete clean and build. Errors all over the place. Ignoring the internal compiler error for the moment, the error I see most is:

Syntax error, static imports are only available if source level is 1.5 or greater

I'm running Java 1.8---why am I getting this message? Is m2e to blame? The maven-compiler-plugin? Or is Eclipse Java 1.8 support simply not ready for prime time?

解决方案

Apparently m2e doesn't yet support Java 8.

According to Eclipse Bug 420848, you have to install m2e 1.5 M6 from the http://download.eclipse.org/technology/m2e/milestones/1.5 software site. I did this and the source level 1.5 errors went away.

这篇关于Eclipse 4.3.2与Java 8补丁不能识别源级1.8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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