Arm*_*min 1 java gwt file smartgwt java-io
我现在正在寻找几个小时,但我找不到我想要的东西.我知道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?
...
Run Code Online (Sandbox Code Playgroud)
任何想法可能是错的?
编辑*.gwt.xml文件:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN"
"http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd">
<module rename-to='yyy'>
<inherits name='com.google.gwt.user.User'/>
<inherits name='com.google.gwt.user.theme.clean.Clean'/>
<entry-point class='com.xxx.yyy.client.Yyy'/>
<source path='client'/>
<source path='shared'/>
<source path='server'/>
<inherits name="com.smartgwt.SmartGwt"/>
</module>
Run Code Online (Sandbox Code Playgroud)
从您的*.gwt.xml
:删除此行:
<source path='server'/>
Run Code Online (Sandbox Code Playgroud)
源标记用于标识需要编译为javascript的包.不应包含服务器包.
归档时间: |
|
查看次数: |
1453 次 |
最近记录: |