2013年4月22日 星期一

NetBeans : Build Successful , but "Cannot find symbol" keep showing

系統環境:
IDE: NetBeans7.0.1

Error :
BUILD SUCCESSFUL
BUT , 出現許多紅色錯誤 "!" 號 : "Cannot find symbol " ,
雖然程式可以執行 , 但卻很困擾 , 很難分辨真假錯誤.

Solution:
刪除 (delete) netbeans 的 cache ---
Windows : %UserProfile%\.netbeans\7.0\var\cache

如果不放心  , 先將 \cache zip 作備份 , 再進行刪除 , 但是檔案很大 .

1. 先關閉 NetBeans  (exit NetBeans)
2. 備份 \cache  (backup  \cache)
3. 刪除 \cache\*  (delete \cache\*)
4. 重啟 NetBeans  (restart NetBeans)

Reference :
http://stackoverflow.com/questions/8298854/what-is-causing-this-java-cannot-find-symbol-error

沒有留言:

張貼留言