2010-10-19 25 views
1

我有一个外部的JAR signpost-core-1.2.1.1.jar(从http://code.google.com/p/oauth-signpost/),我想将其包含到我的Java GWT项目中。如何为外部jar创建gwt.xml文件?

所以我这个外部JAR文件添加到Eclipse中我的构建路径,并把theese进口到我的类别:

import oauth.signpost.basic.DefaultOAuthConsumer; 
import oauth.signpost.exception.OAuthCommunicationException; 
import oauth.signpost.exception.OAuthExpectationFailedException; 
import oauth.signpost.exception.OAuthMessageSignerException; 

在编译时我theese错误信息:

[ERROR] Line 130: No source code is available for type oauth.signpost.basic.DefaultOAuthConsumer; did you forget to inherit a required module? 
[ERROR] Line 133: No source code is available for type oauth.signpost.exception.OAuthMessageSignerException; did you forget to inherit a required module? 
[ERROR] Line 135: No source code is available for type oauth.signpost.exception.OAuthExpectationFailedException; did you forget to inherit a required module? 
[ERROR] Line 137: No source code is available for type oauth.signpost.exception.OAuthCommunicationException; did you forget to inherit a required module? 

所以我把在我的Admin.gwt.xml文件中的以下行:

<inherits name='oauth.signpost.Signpost' /> 

现在我收到此消息:

Loading inherited module 'oauth.signpost.Signpost' 
    [ERROR] Unable to find 'oauth/signpost/Signpost.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source? 

不幸的是,Signpost没有缝提供gwt.xml文件,因为它只包含一个jar文件。

那么我该怎么写呢?

我要把它放在哪里?

或者我只需要设置一些额外的路径?

回答

3

我不知道路标库,但我想你想在客户端使用它。不幸的是,oauth-signpost只为传统的网络服务提供。无论如何,如果你想使用它,它只可能在你完全支持jre的服务器端6.在客户端,你可以只使用提供的gwt模块,它只使用模拟的gwt-jre环境。

+0

谢谢。不知道,但这听起来合乎逻辑。要尝试在服务器端。 – JochenJung 2010-10-19 14:02:22