我有一个外部JAR signpost-core-1.2.1.1.jar(来自http://code.google.com/p/oauth-signpost/),我希望将其包含在我的Java GWT项目中。
所以我将这个外部JAR文件添加到Eclipse中的构建路径,并将theese导入到我的类中:
import oauth.signpost.basic.DefaultOAuthConsumer;
import oauth.signpost.exception.OAuthCommunicationException;
import oauth.signpost.exception.OAuthExpectationFailedException;
import oauth.signpost.exception.OAuthMessageSignerException;
编译时我收到了错误消息:
[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文件。
那我怎么写呢?
我在哪里放置它?
或者我只需要设置一些额外的路径?
答案 0 :(得分:3)
我不知道Signpost库,但我想你想在你的客户端使用它。不幸的是,oauth-signpost仅用于传统的Web服务。无论如何,如果你想使用它,它只能在你完全支持jre 6的服务器端。在客户端你只能使用提供的gwt模块,它只使用模拟的gwt-jre环境。