使用与GWT捆绑在一起的番石榴 [英] Using Guava bundled with GWT

查看:112
本文介绍了使用与GWT捆绑在一起的番石榴的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

GWT 2.2及更高版本包括番石榴。包含Guava的包是 com.google.gwt.thirdparty.guava 。但是,似乎并没有模块XML文件允许将此包用于客户端(可翻译)代码。根据这一观察,似乎这个番石榴的副本只用于GWT内部使用。



对于使用番石榴的GWT项目,建议的方法是下载番石榴分别?如果没有,在客户端代码中包含 com.google.gwt.thirdparty.guava 的过程是什么?

解决方案

是的,如果您想自己使用Guava,则需要guava和guava-gwt jar,并在您的gwt.xml文件中引用所需的模块。过去,你还需要jsr305,虽然我的理解是这个问题已经解决了,所以你可能不需要r09


GWT 2.2 and later includes Guava. The package containing Guava is com.google.gwt.thirdparty.guava. However, there doesn't seem to be a module XML file that would allow this package to be used in client (translatable) code. Based on this observation, it would seem that this copy of Guava is intended for GWT-internal use only.

For GWT projects using Guava, is the suggested approach to download Guava separately? If not, what is the process for including com.google.gwt.thirdparty.guava in client code?

解决方案

Yes, if you want to use Guava yourself, you'll need the guava and guava-gwt jars, and reference the modules you want in your gwt.xml file. In the past, you've also needed jsr305, although my understanding is that this was being fixed, so you may not need that in r09

这篇关于使用与GWT捆绑在一起的番石榴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆