eclipse報錯:Multiple annotations found at this line: - String cannot be resolved to a type解決方法實測


Multiple annotations found at this line:
- String cannot be resolved to a type
- The method getContextPath() from the type HttpServletRequest refers to the missing type String

 

解決辦法:

 

首先 右擊該項目 - Build Path - Configure Build Path , 在 Libraries 選項下,會發現有個出錯的jre Libraries,將其Remove掉。

然后 右擊該項目 - Build Path - Add Library, 選擇JRE System Library,選擇Workspace defaulr JRE(jdk1.6)(此前JDK已成功安裝並配置好), 然后 Finish 。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM