有時候的運行代碼時會出現如下錯誤:
Compiling module com.googlecode.gwt.charts.showcase.Showcase
Finding entry point classes[ERROR] Unable to find type 'com.googlecode.gwt.charts.showcase.client.ShowCase'
[ERROR] Hint: Check that the type name 'com.googlecode.gwt.charts.showcase.client.ShowCase' is really what you
meant
[ERROR] Hint: Check that your classpath includes all required source roots
其原因是,代碼需要調用com.googlecode.gwt.charts.showcase.client.ShowCase,但是它不在classpath環境內,只需把,src目錄加入classpath就可以執行了。
下面講個步奏最多的方法。
步奏一:在Package Explorer窗口選中項目名。按快捷鍵Alt+Enter或者點擊右鍵選擇下面的Properties
步奏二:選擇Run/Debug Settings,然後在右側雙擊項目,進入設置界面
步奏三:就進入設置選項卡了,這個界面應該很熟悉了。如下圖箭頭方向走。Classpath -> User Entries|項目名稱 -> Advanced(高級
)
步奏四:在彈出窗口選擇Add Folders(添加文件夾)
步奏五,選擇當前項目的src目錄,單擊確定,完成。