報錯:The declared package "com.cas" does not match the expected package "main.java.com.cas"
1 、說明
環境說明:2018eclipse + jdk1.8 + tomcat 8
經常搗騰開發環境,昨天還好好的,今天來了,突然發現 所有的類都報錯,這可如何是好,措手不及的感覺有木有0.0,別急哈!!!。大牛的飄過
2 分類:
我這裡是包報錯,有兩種情況。
第一,如果只有一個類的包報這個錯,就是這個類的包路徑不對,修改一下包路徑就可以了。
第二、所有的包路徑都報錯,這就是我目前遇到的情況。
3、解決方法:
選中專案右鍵 ==> Build Path ==> Configure Build Path
把原來的source刪除掉 ,看我報錯的是com.cas,就選擇com的上一級目錄作為source 我這裡的上一級是java所以,選定 OK ==> apply and Close
搞定成功!如果哪裡說錯的話,歡迎指出一起談論!
相關推薦
報錯:The declared package "com.cas" does not match the expected package "main.java.com.cas"
1 、說明 環境說明:2018eclipse + jdk1.8 + tomcat 8 經常搗騰開發環境,昨天還好好的,今天來了,突然發現 所有的類都報錯,這可如何是好,措手不及的感覺有木有0.0,
git報錯:ssh variant 'simple' does not support setting port解決【有效】
一 背景 git 升級到 2.16.x 版本之後,在 Android Studio 上去使用 git 命令以 ssh
git報錯error: src refspec refs/heads/master does not match any.
本地倉庫 打開 分享 之前 img error fsp comm 方案 $ git pusherror: src refspec refs/heads/master does not match any.error: failed to push some refs 出錯解
上傳文件報錯:Warning: POST Content-Length of 9443117 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
The lin clas php 但是 exce 小文件 情況 lan 只需在php.ini中設置: upload_max_filesize = 1000M; post_max_size = 1000M;還有一種情況就是小文件可以上傳成功,但是大文件上傳,$_FILES
小程式執行報錯:“Failed to load local image resource xxx.png the server responded with?
錯誤原因: 由於這是因為初始化的時候,變數還沒渲染進去導致的。 解決方法: 在src前面加個: wx:if<image wx:if='{{customerLevel.value}}' class
在nodejs專案報錯:CROSSSLOT Keys in request don't hash to the same slot解決方法
由於後臺用的是redis叢集,我前端剛好碰巧用的是nodejs express框架。express儲存session有自己的機制。本來單獨的redis主模式是很好用redis儲存session的,但奈何用了叢集分片模式~~。 下面是當後臺使用redis分片模式
解決:The declared package..does not match the expected package..
在MyEclipse中編寫Java程式碼時,用到了BASE64Decoder,import sun.misc.BASE64Decoder;可是Eclipse提示: Access restriction : The type BASE64Decoder is not accessible due to res
docker執行命令報錯:Got permission denied while trying to connect to the Docker daemon socket at unix:///va
環境:ubuntu16.04執行命令:docker run -it centos報錯:Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/do
從SVN上檢出Maven專案報紅叉錯誤,package錯誤 does not match the expected package "main.java.com.*
不知道為什麼有時候從SVN上檢出maven專案時,專案總是丟失資原始檔,然後就會出現以下的錯誤,does not match the expected package "main.java.com.* 這是由於build path 沒有載入到資原始檔目錄,右鍵點選專
解決:The declared package..does not match the expected package..(轉自百度空間)
Volatile修飾的成員變數在每次被執行緒訪問時,都強迫從共享記憶體中重讀該成員變數的值。而且,當成員變數發生變化時,強迫執行緒將變化值回寫到共享記憶體。這樣在任何時刻,兩個不同的執行緒總是看到某個成員變數的同一個值。 Java語言規範中指出:為了獲得最佳速度,允許執行緒儲存共享成員變數的私有拷貝,而且
docker 報錯:x509: certificate has expired or is not yet valid
%d pull mage set repos 證書 val 證書過期 ica 環境:centos 7 程序:docker 下載鏡像報錯: # docker pull centos Pulling repository centos FATA[0004] Get https
docker啟動容器報錯:IPv4 forwarding is disabled. Networking will not work
報錯 onf con lan isa war ces -s comm 報這個錯誤會導致宿主機以外的pc 訪問不了容器 按照網上的解決辦法: 在/usr/lib/sysctl.d/00-system.conf文件後加net.ipv4.ip_forward=1 即可docker
如何處理Eclipse錯誤訊息 The declared package does not match the expected package
我從github下載了一個開源專案後,匯入到自己Eclipse之後,遇到了這個煩人的錯誤訊息: The declared package "com.sap.smartService" does not match the expected package "main.java.com.sap.smartSer
如何處理Eclipse錯誤消息 The declared package does not match the expected package
下載 分享 開源項目 錯誤 rop cte 是我 遇到 images 我從github下載了一個開源項目後,導入到自己Eclipse之後,遇到了這個煩人的錯誤消息: The declared package "com.sap.smartService" does not m
Maven專案,報錯Java compiler level does not match the version of the installed Java project facet
使用eclipse新建maven專案。專案建立後手動修改org.eclipse.wst.common.project.facet.core.xml檔案, 修改專案 Project Facets 修改後發現專案名稱處報錯,有紅色叉號。 查詢eclipse中Problems
報錯:TypeError: 'NoneType' object is not callable問題解決
報錯:TypeError: ‘NoneType’ object is not callable問題解決方法 def dec(function): print("start...") function() print("end...") #修飾器 @dec def
Java開發HBase程式報錯:HADOOP_HOME or hadoop.home.dir are not set.
Java開發HBase程式報錯:HADOOP_HOME or hadoop.home.dir are not set. 1.報錯 16:36:44.271 [main] DEBUG org.apache.hadoop.util.Shell - Failed to detect a
spring cloud 啟動報錯-must be declared as an @AliasFor [serviceId], not [name].
專案加入FeignClient後再啟動就報錯,具體報錯資訊如下: org.springframework.core.annotation.AnnotationConfigurationException: Attribute 'value' in annotation [org.springframe
模態視窗(登陸) 報錯:forebought:14 Uncaught TypeError: $(...).modal is not a function
在點選一個地方觸發模態視窗的時候報如下錯誤:forebought:14 Uncaught TypeError: $(...).modal is not a function 錯誤原因:我只匯入了j
python 之報錯:TypeError: write() argument must be str, not bytes
在用 pickle.dump() 儲存二進位制檔案時,一直報錯,程式如下: with open(os.path.join(FLAGS.train_data_dir, 'files.log'), 'w') as f: pickle.dump([training_paths, testing_