cincheo / jsweet

A Java to JavaScript transpiler.
http://www.jsweet.org
Other
1.46k stars 161 forks source link

Evaluating Jsweet for applet to HTML conversion #714

Open vishnusoman84 opened 2 years ago

vishnusoman84 commented 2 years ago

I have been evaluating Jsweet since the past 4 days in order to finalize a tool that can be used to modernize an application from applet to html5/js based front end. I have been able to try the trial examples where applet based java files are getting transpiled to .js files. As a next step I need to have Jsweet introduced to the an applet based application which has 9 tabs with considerable components like dashboards, report generation related drop downs, date picker elements, tables etc. However this application which I need to modernize is not maven based and hence does not have a pom.xml. It is executed using Tomcat.

Is maven a pre requisite for Jsweet? My expectations from Jsweet are that if I am able to introduce Jsweet to my codebase like in the example and able to create a build using maven, I should be in a position to get .js files created in the target>js>applet folder. Could these be confirmed please?

lgrignon commented 2 years ago

Maven is not required, although recommended. Please see the examples project, which uses the command line launcher (wrapped in an ant build, but can be launched from command line of course): https://github.com/cincheo/jsweet-examples/blob/master/build.xml#L27

You could also embed the JSweet's jar as a depency and use the transpiler in your code which would give you more flexibility, but it's also more complicated (the JSweet maven plugin code, which is open source, could help you understand how to do it).