Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/elixir/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
GWT添加jar而不是项目_Gwt - Fatal编程技术网

GWT添加jar而不是项目

GWT添加jar而不是项目,gwt,Gwt,到目前为止,我在GWT项目构建路径中添加了2个项目,并在GWT.xml中继承了它们,以使用它们的类。一切都很顺利 然后我尝试将gwt项目部署到tomcat,因此,我需要为这两个项目创建一个.jar文件,并将它们添加到构建路径中。但现在我犯了错误 Compiling module com.wn.webapp.WebApp Validating units: Ignored 17 units with compilation errors in first pass. Compil

到目前为止,我在GWT项目构建路径中添加了2个项目,并在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 编译模块com.wn.webapp.webapp 验证单元: 第一遍忽略了17个有编译错误的单元。 编译时将-strict或-logLevel设置为TRACE或DEBUG以查看所有错误。 查找入口点类 “文件:/C:/Users/laura.eckardt/workspace/WebApp/src/com/wn/WebApp/client/ServiceCalls.java”中的[ERROR]错误 [错误]第24行:无法解析导入com.wn.retail [错误]第25行:无法解析导入com.wn.retail [错误]第26行:无法解析导入com.wn.retail [错误]第27行:无法解析导入com.wn.retail [错误]第28行:无法解析导入com.wn.retail [错误]第187行:无法将LaneContact解析为类型 [错误]第187行:类型new AsyncCallback>(){}必须实现继承的抽象方法AsyncCallback>.onSuccess(列表) [错误]第187行:无法将LaneContact解析为类型 [错误]第196行:new AsyncCallback>(){}类型的onSuccess(List)方法必须重写或实现超类型方法 [错误]第196行:无法将LaneContact解析为类型 [错误]第214行:无法将LaneStatus解析为类型 [错误]第214行:类型new AsyncCallback(){}必须实现继承的抽象方法AsyncCallback.onSuccess(LaneStatus) [错误]第214行:无法将LaneStatus解析为类型 [错误]第223行:new AsyncCallback(){}类型的onSuccess(LaneStatus)方法必须重写或实现超类型方法 [错误]第223行:无法将LaneStatus解析为类型 [错误]第343行:无法将LaneContact解析为类型 [错误]第350行:无法将LaneStatus解析为类型 [错误]第386行:无法将请求解析为类型 [错误]第390行:无法将InquiryHolder解析为类型 [错误]第419行:类型通道中的方法setCurrentRequest(请求)引用缺少的类型请求 [错误]第420行:类型通道中的方法setCurrentInquiry(查询)引用缺少的类型查询 [错误]第424行:无法将LaneStatus解析为类型 [错误]第429行:类型ItemList中的方法setTransactionEntries(Transaction)引用了缺少的类型事务 [错误]第436行:InputMethodHolder无法解析为类型 [错误]找不到类型“com.wn.webapp.client.webapp” [错误]提示:以前的编译器错误可能导致此类型不可用 [错误]提示:检查模块中的继承链;它可能没有继承所需的模块,或者模块可能没有正确添加其源路径项
现在出了什么问题?

创建jar文件时,需要包含源文件(
.java
)。要在eclipse中执行此操作,您需要右键单击项目,然后选择
Export
,然后选择
Java
文件夹中的
JAR文件。在下一个屏幕中,检查“导出Java源文件和资源”,然后
Finish


将jar文件添加到构建路径后应该可以工作。

创建jar文件时,需要包含源文件(
.java
)。要在eclipse中执行此操作,您需要右键单击项目,然后选择
Export
,然后选择
Java
文件夹中的
JAR文件。在下一个屏幕中,检查“导出Java源文件和资源”,然后
Finish


将其添加到生成路径后应该可以工作。

库是否位于
war/WEB-INF/lib
中,其中
war
是应用程序的顶级文件夹,您将其放置在Tomcat的
webapps/
文件夹中?是的。我将它们添加到构建路径中。您是否设法在开发模式下运行该项目?不,这是我目前正在尝试的,错误是否来自我现在就知道了。你必须确保你的jar中包含
.java
文件,而不仅仅是
.class
文件。你的库是否在你的
war/WEB-INF/lib
中,其中
war
是你的应用的顶级文件夹,你把它放在Tomcat的
webapps/
文件夹中?是的。我将它们添加到构建路径中。您是否设法在开发模式下运行该项目?不,这是我目前正在尝试的,错误是否来自我现在就知道了。您必须确保jar中包含
.java
文件,而不仅仅是
.class
文件。