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选项,其他操作同上
java新工程导入eclipse常见问题---Multiple annotations found at this line
最新推荐文章于 2023-09-17 17:39:00 发布