我现在正在寻找几个小时,但我找不到我想要的东西.我知道GWT客户端软件包不支持java.io.File.我想在服务器包中使用它.当我编译应用程序时,我收到以下错误:
Compiling module com.xxx.yyy.GWTApp Validating units: [ERROR] Errors in 'file:/.../workspace/GWTApp/src/com/xxx/yyy/server/Class1.java' [ERROR] Line 26: No source code is available for type java.io.File; did you forget to inherit a required module? [ERROR] Errors in 'file:/.../workspace/GWTApp/src/com/xxx/yyy/server/Class2.java' [ERROR] Line 104: No source code is available for type java.io.BufferedReader; did you forget to inherit a required module? [ERROR] Line 104: No source code is available for type java.io.FileReader; did you forget to inherit a required module? ...
任何想法可能是错的?
编辑*.gwt.xml文件:
David Levesq.. 5
从您的*.gwt.xml
:删除此行:
源标记用于标识需要编译为javascript的包.不应包含服务器包.
从您的*.gwt.xml
:删除此行:
<source path='server'/>
源标记用于标识需要编译为javascript的包.不应包含服务器包.