Melding the worlds of Java and JavaScript, JavaPoly.js extends native Java Virtual Machine support to browsers via a library serving as a polyfill.
JavaPoly.js enables developers to import existing Java code and invoke it from JavaScript. "It finally allows Java to become a first-class citizen by running directly in the browser's script tags (and interacting directly with the DOM), instead of being confined to an applet sandbox," according to the project's Web page. The user does not need to have Java installed on their computer.
In theory, JavaPoly.js would enable a host of JVM languages to be supported in the browser, including Groovy and Scala, project developer Jim Sproch said. "Any language [that] runs in the JVM should be able to run using JavaPoly," he said. "In fact, you could even run Python using Jython. This project will likely spawn several other projects to support all the various languages." Sproch further acknowledged that the project is largely about enabling Web development in Java.
To read this article in full or to leave a comment, please click here