Search code examples
javajavascriptdukescript

Can we use Dukescript as an applet replacement?


I read that DukeScript, a technology meant to bring Java to every client without the need of a plug-in.

Can this technology used as an applet replacement?


Solution

  • In geneneral I'd say yes. Is there a particular reason why you would choose to use java applets in the past, meaning: did they need to do things like accessing the hardware and/or file system?

    If your applet would do nothing more than what JavaScript would be able to do, then yes, you can definitely look at Java to to JavaScript solutions like GWT or DukeScript. They're quite different: one translates Java source code to JavaScript, the other one uses Java VMs written in JavaScript in order to run bytecode. Regardless, they're subject to the same limitations, when deployed to standard browsers. DukeScript though can be packaged up as a standalone app, running inside the JavaFX browser or as a native app on mobiles, therefore it can do more than standard JavaScript can do.