2013-06-05 23 views
1

我爲我的gwt項目下載了gflot。爲了瞭解庫,我創建了一個名爲「FlotDemo」的測試項目。我使用Eclipse和創建與項目創建嚮導(跟人打招呼的servlet等等的東西)的幫助下一個普通的GWT項目將gFlot庫添加到GWT項目失敗

這是我做過什麼:

  1. 下載gflot- 3.1.1.jar並將它複製到/戰爭/ WEB-INF/lib目錄
  2. 新增的項目 - >屬性 - > Java構建路徑 - >庫gflot-JAR的路徑
  3. 新增<inherits name="ca.nanometrics.gflot.GFlot"/>我的「FlotDemo。 gwt.xml「
  4. 去到gFlot example並將其粘貼到我的Entr yPoint class

因此,在第4步之後,eclipse strangly無法解析我在代碼中使用的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) 

什麼我錯在這裏做什麼?

回答

2

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

自3.0起,改爲使用<inherits name='com.googlecode.gflot.GFlot'/>

查看example

+0

感謝您的幫助 – toom