简体   繁体   English

如何为外部jar创建gwt.xml文件?

[英]How to create a gwt.xml file for an external jar?

I have an external JAR signpost-core-1.2.1.1.jar (from http://code.google.com/p/oauth-signpost/ ), that I want to include into my Java GWT project. 我有一个外部JAR signpost-core-1.2.1.1.jar(来自http://code.google.com/p/oauth-signpost/ ),我想将其包含在Java GWT项目中。

So I add this external JAR file to my build path in Eclipse and put theese imports to my Class: 因此,我将此外部JAR文件添加到Eclipse中的构建路径中,并将theese导入放入我的Class中:

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

While compiling I got theese error messages: 编译时出现了这些错误消息:

[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?

So I put the following line in my Admin.gwt.xml file: 因此,将以下行放入Admin.gwt.xml文件中:

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

And now I'm getting this message: 现在,我收到此消息:

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?

Unfortunately the Signpost does not seam provide a gwt.xml file, since it consists only of a jar file. 不幸的是,路标没有接缝提供gwt.xml文件,因为它仅包含一个jar文件。

So how can I write it? 那我怎么写呢?

And where do I have to place it? 而且我必须在哪里放置它?

Or do I just need to set some additional paths? 还是只需要设置一些其他路径?

I don't know Signpost library but I suppose that you want to use it in your client side. 我不知道Signpost库,但我想您想在客户端使用它。 Unfortunately oauth-signpost is only provided for traditional web services. 不幸的是,oauth-signpost仅提供给传统的Web服务。 Anyway if you want to use it, its possible only on server side where you have full support of jre 6. On client side you can use only provided gwt modules that use only emulated gwt-jre environment. 无论如何,如果要使用它,它只能在完全支持jre 6的服务器端使用。在客户端,您只能使用仅提供模拟gwt-jre环境的提供的gwt模块。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM