您的位置:首页 > 编程语言 > Java开发

java新工程导入eclipse常见问题---Multiple annotations found at this line

2017-07-09 20:21 771 查看
1.


报错信息是:Multiple annotations found at this line:

- java.io.IOException cannot be resolved to a type

- String cannot be resolved to a type

- java.io.IOException cannot be resolved to a type

- String cannot be resolved to a type

- The type java.util.Map cannot be resolved. It is indirectly referenced from

required .class files

- The method getScheme() from the type ServletRequest refers to the missing type

String

- The type java.util.Map cannot be resolved. It is indirectly referenced from

required .class files

2.


报错信息:Multiple annotations found at this line:

- The method getContextPath() from the type HttpServletRequest refers to the

missing type String

- The method getContextPath() from the type HttpServletRequest refers to the

missing type String

3.解决方案

①.右键工程->Build Path -> Configure Build Path , 在 Libraries 选项下,会发现有个出错的jre Libraries,将其Remove掉。



②.然后右击该项目 - Build Path - Add Library, 选择JRE System Library,选择添加的版本,之后一路ok即可。



4.小插曲:我的eclipse里面开始没有找到build path,很是头大,后来自己多次尝试,有两种方法可以找到

①.在右上角有各种模式可以选择,选择java之后,右键该项目就有build path选项了,之后操作同上。

②.在javaEE模式下也可以使用build path,截图不是javaEE模式(别误会)



右键JRE就可以看到build path选项,其他操作同上

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  eclipse java
相关文章推荐