GWT java.io.File服务器包

 wangbiao少爷 发布于 2023-01-29 16:50

我现在正在寻找几个小时,但我找不到我想要的东西.我知道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的包.不应包含服务器包.

1 个回答
  • 从您的*.gwt.xml:删除此行:

    <source path='server'/>
    

    源标记用于标识需要编译为javascript的包.不应包含服务器包.

    2023-01-29 16:51 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有