我想以自己的方式組織我的文件夾,但目前無法運行。GWT:無法加載模塊
這是我的目錄結構
SRC
- com.tutorial.client
- DictionaryModule
- com.tutorial.module
- Tutorial.gwt.xml
Tutorial.gwt.xml:
<module rename-to="tutorial">
<inherits name='com.google.gwt.user.User'/>
<inherits name='com.google.gwt.user.theme.standard.Standard'/>
<entry-point class="com.tutorial.client.DictionaryModule"/>
</module>
DictionaryModule
package com.tutorial.client;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
public class DictionaryModule implements EntryPoint {
HorizontalPanel dictionaryPanel;
Label wordLabel;
public DictionaryModule(){
dictionaryPanel = new HorizontalPanel();
wordLabel = new Label("Word");
}
@Override
public void onModuleLoad() {
dictionaryPanel.add(wordLabel);
RootPanel.get("dictionary").add(dictionaryPanel);
}
}
,但我得到這個錯誤:
[ERROR] Unable to find type 'com.tutorial.client.DictionaryModule' [ERROR] Hint: Previous compiler errors may have made this type unavailable [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly [ERROR] Failure to load module 'tutorial'
這似乎並沒有工作了。 X( – Jeune 2009-10-31 14:09:35