How to convert existing javascript to java to use with GWT?

前端 未结 5 1809
半阙折子戏
半阙折子戏 2021-01-13 12:53

Is there a tool to convert javascript to java, so I can handle the project using GWT?

update

For those who don\'t know, GWT (Google Web Tool

5条回答
  •  不知归路
    2021-01-13 13:43

    What exactly do you have in mind? If you're looking for some sort of automatic tool, that generates GWT Java code from Javascript, then I'm afraid there's no such thing.

    You can (and should) use JavaScript Native Interface (JSNI), probably in combination with JavaScript Overlay Types (JSO) to wrap your existing Javascript code, so that it's possible to interface with it from GWT's Java code. See the Getting to really know GWT, Part 1: JSNI (and Part 2) post on GWT's offcial blog for some pointers and use cases.

提交回复
热议问题