有时候的运行代码时会出现如下错误:
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目录,单击确定,完成。