Want to convert a couple of Java Applets

415 views
Skip to first unread message

Tom Adams

unread,
Jun 30, 2014, 7:08:45 PM6/30/14
to google-we...@googlegroups.com
I have a couple of Java Applets deployed on the web that I would like to convert away from deploying  Java Applets, due to the apparent failure/decline of Java Applets as a web technology.

There are at www.poologic.com. they are the Poologic Calculator and ROI Calculator.

Seems I can use GWT to compile them into javascript, not sure.

Is GWT  a good option? Are their better options?

I am at the bottom of the learning curve, just found GWT a few hours ago.  I was starting to learn javascript, but I decided to do some searches on automatic Java to Javascript conversion tools today.

Thanks for any advice or ideas.

Fabien DUMAY

unread,
Jul 1, 2014, 5:39:45 AM7/1/14
to google-we...@googlegroups.com
Hi Tom,

I think GWT will be a good option to rewrite your Calculator. Anyway you will have to rewrite your screens but you will be able to reuse your logic code.
If you want to copy/paste your code, you must ensure few points :
Anyway if your applet doesn’t respect those points, GWT will be a good solution but you will have to rewrite or refactor your code.
As you know Java and Applet, GWT is the easiest solution for you to make your Calculator in a web browser. But you will spend a bit of time to learn it.

Regards,

Fabien.

Thomas Broyer

unread,
Jul 1, 2014, 5:46:52 AM7/1/14
to google-we...@googlegroups.com
There are other Java-to-JavaScript transpilers [1,2], but GWT is by far the best of them. You'll have to rewrite the UI and client/server communications (if you have some) but you should be able to keep all your "business logic" as-is.

[1] http://j2s.sourceforge.net/ seems to still be actively developed but hasn't released anything for years; it's an Eclipse plugin though (cannot be used from the command line or a build tool like Ant or Maven, etc.)
[2] https://st-js.github.io/ is only about the Java syntax, it doesn't emulate many classes from the standard library (starting with Java Collection, making it a no-go for a migration of an existing Java project)
Reply all
Reply to author
Forward
0 new messages