我正在使用GWT编写应用程序,我希望将其部署到Google App Engine。 我想使用JRE中的一些类,例如java.io.BufferedReader;
java.net.URL
javax.crypto.Cipher
java.util.zip.InflaterInputStream
,这些列在JRE Class White List
: //developers.google.com/appengine/docs/java/jrewhitelist
我正在使用eclipse,当我尝试在本地运行我的应用程序时,编译器将向我抛出[ERROR] [gwtlist] - Line 46: No source code is available for type java.net.URL; did you forget to inherit a required module?
类的[ERROR] [gwtlist] - Line 46: No source code is available for type java.net.URL; did you forget to inherit a required module?
[ERROR] [gwtlist] - Line 46: No source code is available for type java.net.URL; did you forget to inherit a required module?
。
在Google App Engine General Questions
: //developers.google.com/appengine/kb/general#language中,它说: ...Also, Java-based applications may only use the JRE classes in the JRE class white list.
我的问题是我是否认为是对还是错? 该JRE Class White List
可以在客户端使用吗,或者仅对服务器端代码有用? 在这种情况下,我不需要使用Google App Engine,因为所有客户端代码都必须使用JRE Emulation Reference
- https://developers.google.com/web-toolkit中的一些Java类仅用纯GWT
编写。 / doc / latest / RefJreEmulation?hl = es-419#Package_java_io 。 在这种情况下,Google App Engine的目标是什么? 仅模拟服务器吗?
编辑:如果Google App Engine只能在服务器端模拟JRE类,您能告诉我确切的应用程序在哪里运行。 我的意思是:
App已部署在Google App Engine上。
客户端运行应用程序并登录。
服务器端代码在其他服务器上打开外部文件,将其解压缩,然后将结果发送到客户端。
我的问题是transfer
如何进行? 它是Google云内部的一切吗,还是客户端必须下载此未压缩的文件?''
Appengine代码仅在服务器端。
如果它是客户端代码,则可以在GWT的AE中使用不在白名单中的类。 无论如何,它将被编译为javascript。 但是,您用于通过GWT从客户端进行rpc调用的任何服务器端代码都必须在AE白名单中,因为它在此运行。
错误“ GWT产生了错误” java.net.URL类型没有可用的源代码”。 基本上,它正在寻找src以便编译为javascript。 GWT也有一个将要编译的东西的白名单,除此之外,您还需要src,除非您将它作为* .gwt.xml文件中的GWT模块继承。 请参阅https://developers.google.com/web-toolkit/doc/latest/RefJreEmulation