简体   繁体   English

Java8和Aspectj插件不兼容?

[英]Java8 and Aspectj plugin are not compatible?

I'm using eclipse Kepler 4.3.2 with STS, Maven and other Web development tools. 我正在使用带有STS,Maven和其他Web开发工具的Eclipse Kepler 4.3.2。 Today i thinked about trying some lambdas with Java 8, so I installed JDK1.8 and Eclipse Plug-in Development Environment Patch with Java 8 support (for Kepler SR2). 今天,我考虑过使用Java 8尝试使用一些lambda,因此我安装了具有Java 8支持(适用于Kepler SR2)的JDK1.8和Eclipse插件开发环境补丁。 It was working but when I opened project i was working with I got bunch build errors in dispatcher-servlet.xml: 它正在工作,但是当我打开项目时,在dispatcher-servlet.xml中出现了很多构建错误:

Build path is incomplete. 构建路径不完整。 Cannot find class file for org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException 找不到org / aspectj / weaver / reflect / ReflectionWorld $ ReflectionWorldException的类文件

It looked like AspectJ plugin was uninstalled, so I installed it again: AspectJ Development Tools (AJDT) including the AspectJ compiler. 看起来AspectJ插件已卸载,因此我又重新安装了它:AspectJ开发工具(AJDT),包括AspectJ编译器。 AspectJ compiler for Eclipse 用于Eclipse的AspectJ编译器

After rebuiling, project works again but I cant use lambdas. 重新构建后,项目可以再次运行,但是我不能使用lambda。 In preferences > Compiler compliance level there isn't Java 1.8. 在首选项>编译器合规性级别中,没有Java 1.8。 It was there before installing AspectJ stuff. 在安装AspectJ东西之前就在那里。

What can I do to make this work together? 我可以做些什么使它们一起工作?

You can install the most recent development version of AspectJ plug-in for Kepler, which supports Java 8 at http://download.eclipse.org/tools/ajdt/43/dev/update 您可以在http://download.eclipse.org/tools/ajdt/43/dev/update安装针对Kepler的AspectJ插件的最新开发版本,该插件支持Java 8。

Then re-install the JDT update at http://download.eclipse.org/eclipse/updates/4.3-P-builds/ 然后在http://download.eclipse.org/eclipse/updates/4.3-P-builds/重新安装JDT更新

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

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