Java to JavaScript using GWT compiler

前端 未结 4 2017
长发绾君心
长发绾君心 2021-02-07 12:43

I have some Java code written that I\'d like to convert to JavaScript. I wonder if it is possible to use the GWT compiler to compile the mentioned Java code into JavaScript code

4条回答
  •  离开以前
    2021-02-07 12:56

    You can "export" your function by writing inline JavaScript that calls it, and there is a tool gwt-exporter that does this automatically when you annotate classes and methods with @Export and similar. More information: https://code.google.com/p/gwtchismes/wiki/Tutorial_ExportingGwtLibrariesToJavascript_en

提交回复
热议问题