寫老師布置的作業(yè)從機房copy到自己的電腦上發(fā)現(xiàn)報錯了,以下是報錯信息:
Multiple annotations found at this line:
在該行中找到的多個注釋
- String cannot be resolved to a type
-string不能解析為類型
- The method getParameter(String) from the type ServletRequest refers to the missing tye string從ServletRequest類型中獲取參數(shù)(String)的方法引用缺少的Type字符
解決方法:
首先,右擊該項目 - Build Path - Configure Build Path。
在 Libraries 選項下,會發(fā)現(xiàn)有個出錯的jre Libraries,將其Remove掉,然后點擊Apply。
接下來點擊Add Library, 選擇JRE System Library
選擇Workspace defaulr JRE(jdk-10.0.2)(此前JDK已成功安裝并配置好), 然后Finish 。
最后,Apply and Close即可。
步驟如下圖所示:
?
?文章來源:http://www.zghlxwxcb.cn/news/detail-498754.html
文章來源地址http://www.zghlxwxcb.cn/news/detail-498754.html
到了這里,關(guān)于eclipse報錯:Multiple annotations found at this line: - String cannot be resolved to a type 解決方法的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!