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

前端 未结 5 1806
半阙折子戏
半阙折子戏 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:46

    At a theoretical level, you could use Rhino compiler to turn Javascript into Java class files, but the project seems mostly abandoned nowadays, and it would be crazy to use it with GWT to turn the result back to JavaScript.

    For GWT, as you are eventually going back to Javascript anyway, you should use the JavaScript native interface to call existing Javascript code.

提交回复
热议问题