我有一个外部 JAR signpost-core-1.2.1.1.jar(来自http://code.google.com/p/oauth-signpost/),我想将它包含到我的 Java GWT 项目中。
所以我将此外部 JAR 文件添加到我在 Eclipse 中的构建路径中,并将这些导入到我的类中:
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 文件。
那我该怎么写呢?
我必须把它放在哪里?
还是我只需要设置一些额外的路径?