开发者

GWT interoperability: invoke java applet from GWT generated javascript

Since GWT is cross-compiled to javascript, only a few JRE packages are emulated. What if I need to make complex computati开发者_Go百科ons with packages not supported by the GWT x-compiling?

Is there a way to create a separate java app that can be invoked from the client side GWT (which would of course need to be shipped with the client). I don't want to ask the server to compute stuff that can be done by the client.

For example, I have a computer imaging library that could perform stuff for me without invoking the remote server.

Thank you.


If you can do something using pure Javascript/Javascript library you can use it straightway within GWT using JSNI. JSNI is basically a bridge to write Javascript within client side java code. Thus if you find yourself stuck trying to figure out how to do things in GWT which can easily be achieved using Javascript, either using plain Javascript or using 3rd party Javascript libraries, use JSNI.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜