到目前为止,我已将2个项目添加到我的GWT项目构建路径并在gwt.xml中继承它们以使用它们的类。一切都运作良好。
然后我尝试将gwt项目部署到tomcat,因此,我需要创建两个项目的.jar文件并将它们添加到构建路径中。但现在我收到了错误。
Compiling module com.wn.webapp.WebApp Validating units: Ignored 17 units with compilation errors in first pass. Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors. Finding entry point classes [ERROR] Errors in 'file:/C:/Users/laura.eckardt/workspace/WebApp/src/com/wn/webapp/client/ServiceCalls.java' [ERROR] Line 24: The import com.wn.retail cannot be resolved [ERROR] Line 25: The import com.wn.retail cannot be resolved [ERROR] Line 26: The import com.wn.retail cannot be resolved [ERROR] Line 27: The import com.wn.retail cannot be resolved [ERROR] Line 28: The import com.wn.retail cannot be resolved [ERROR] Line 187: LaneContact cannot be resolved to a type [ERROR] Line 187: The type new AsyncCallback>(){} must implement the inherited abstract method AsyncCallback>.onSuccess(List) [ERROR] Line 187: LaneContact cannot be resolved to a type [ERROR] Line 196: The method onSuccess(List) of type new AsyncCallback>(){} must override or implement a supertype method [ERROR] Line 196: LaneContact cannot be resolved to a type [ERROR] Line 214: LaneStatus cannot be resolved to a type [ERROR] Line 214: The type new AsyncCallback(){} must implement the inherited abstract method AsyncCallback.onSuccess(LaneStatus) [ERROR] Line 214: LaneStatus cannot be resolved to a type [ERROR] Line 223: The method onSuccess(LaneStatus) of type new AsyncCallback(){} must override or implement a supertype method [ERROR] Line 223: LaneStatus cannot be resolved to a type [ERROR] Line 343: LaneContact cannot be resolved to a type [ERROR] Line 350: LaneStatus cannot be resolved to a type [ERROR] Line 386: Request cannot be resolved to a type [ERROR] Line 390: InquiryHolder cannot be resolved to a type [ERROR] Line 419: The method setCurrentRequest(Request) from the type Lane refers to the missing type Request [ERROR] Line 420: The method setCurrentInquiry(Inquiry) from the type Lane refers to the missing type Inquiry [ERROR] Line 424: LaneStatus cannot be resolved to a type [ERROR] Line 429: The method setTransactionEntries(Transaction) from the type ItemList refers to the missing type Transaction [ERROR] Line 436: InputMethodHolder cannot be resolved to a type [ERROR] Unable to find type 'com.wn.webapp.client.WebApp' [ERROR] Hint: Previous compiler errors may have made this type unavailable [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
现在出了什么问题?
答案 0 :(得分:1)
创建jar文件时,需要包含源文件(.java
)。要在eclipse中执行此操作,您需要右键单击项目,然后选择Export
,然后选择JAR file
文件夹中的Java
。在下一个屏幕中,选中“导出Java源文件和资源”,然后选择Finish
。
将其添加到构建路径后应该可以正常工作。