【问题标题】:Adding gFlot library to a GWT project fails将 gFlot 库添加到 GWT 项目失败
【发布时间】:2013-06-06 18:04:00
【问题描述】:

我为我的 gwt 项目下载了 gflot。为了了解这个库,我创建了一个名为“FlotDemo”的测试项目。我正在使用 Eclipse 并在项目创建向导的帮助下创建了一个普通的 gwt 项目(带有问候 servlet 的东西等等)

这就是我所做的:

  1. 下载gflot-3.1.1.jar并复制到/war/WEB-INF/lib中
  2. 在 Project->Properties->Java Build Path->Libraries gflot-jar 中添加到路径
  3. 在我的“FlotDemo.gwt.xml”中添加了<inherits name="ca.nanometrics.gflot.GFlot"/>
  4. 转到gFlot example 并将其复制并粘贴到我的EntryPoint 类中

所以在第 4 步之后,eclipse 奇怪地无法从我在代码中使用的 gflot 中解析对象。我尝试在 gwt 模拟器中运行 Web 应用程序,但它退出并显示错误消息:

2013-06-05 17:24:51.212 java[12069:707] [Java CocoaComponent compatibility mode]: Enabled
2013-06-05 17:24:51.213 java[12069:707] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
Loading modules
   flotdemo.FlotDemo
      Loading inherited module 'flotdemo.FlotDemo'
         Loading inherited module 'ca.nanometrics.gflot.GFlot'
            [ERROR] Unable to find 'ca/nanometrics/gflot/GFlot.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
         [ERROR] Line 11: Unexpected exception while processing element 'inherits'
com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
    at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:308)

我在这里做错了什么?

【问题讨论】:

    标签: gwt module flot


    【解决方案1】:

    <inherits name="ca.nanometrics.gflot.GFlot"/> 是旧的。

    从 3.0 开始,改用<inherits name='com.googlecode.gflot.GFlot'/>

    请参阅example

    【讨论】:

      猜你喜欢
      • 2013-06-04
      • 1970-01-01
      • 2018-11-19
      • 1970-01-01
      • 2014-12-08
      • 1970-01-01
      • 2021-05-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多