尝试使用Base64Utils - 但GWT编译器失败 [英] Try to use Base64Utils - but GWT compiler fails

查看:542
本文介绍了尝试使用Base64Utils - 但GWT编译器失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在服务器端使用com.google.gwt.user.server.Base64Utils为en code我的形象,但是编译器给我这个信息(后来导致错误):

I try to use the com.google.gwt.user.server.Base64Utils to encode my image on the server side, but the compiler giving me this info (later causing an error):

*"[INFO] [ERROR] Errors in 'jar:file:/C:/.../....rpc-1.12-SNAPSHOT.jar!/...////PictureFileDTO.java' 
[ERROR] Line 46: No source code is available for type com.google.gwt.user.server.Base64Utils; did you forget to inherit a required module?"*

在Eclipse中使用GWT 2.1.0和Maven。

Using GWT 2.1.0 and Maven in Eclipse.

我缺少的是在这里吗?任何想法?

What am I missing here? Any ideas?

推荐答案

在GWT-user.jar是你制定打击,你无论开发客户端或服务器端code库。它包含的一切,UI部件,实用类的客户端,以及公用事业类为服务器侧

The gwt-user.jar is the library you develop against, regardless whether you develop client-side or server-side code. It contains everything, UI widgets, utility-classes for the client-side, as well as utility-classes for the server-side.

在GWT-的servlet.jar在运行时使用。我不是在谈论的发展模式,但一些网络服务器上运行的Web应用程序(阿帕奇,IIS ...)。在GWT-的servlet.jar包含由Web服务器需要运行服务器端的类GWT的东西。

The gwt-servlet.jar is used at runtime. I'm not talking about development mode, but about running your web application on some web server (Apache, IIS...). The gwt-servlet.jar contains the classes that are needed by the web server to run server-side GWT stuff.

所以,是的,Base64Utils类是在这两个JAR文件。尽管如此,它不适用于客户端开发。

So yes, the Base64Utils class is in both JAR files. Nevertheless it is not available for client-side development.

如果您需要双方一起想,检查了这一点:

If you need something that work on both sides, check this out:

HTTP://www.source-$c$c .BIZ / BASE64 codeR / JAVA /

这篇关于尝试使用Base64Utils - 但GWT编译器失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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