Software:JavaPoly

From HandWiki
Short description: Library that pollyfills native JVM support
JavaPoly.js
Original author(s)Jim Sproch
Initial releaseMay 9, 2016; 7 years ago (2016-05-09)[1]
Written inJavaScript
Operating systemOS X, Linux, Solaris, FreeBSD, OpenBSD, Microsoft Windows
Websitewww.javapoly.com

JavaPoly is a library that polyfills native JVM support within any modern web browser.[2] This allows websites to import Java libraries, and call them directly from Javascript, even if the user does not have Java installed on their computer.[3] Unlike GWT and TeaVM, which attempt to compile a subset of Java into Javascript, JavaPoly actually executes Java bytecode instructions. This means that JavaPoly can run almost any Java library, including libraries that use threads, shared memory, locking primitives, and 64-bit integers.[4]

JavaPoly is designed to optimize performance by taking advantage of native JVMs when available.[5] When running in Node.js, JavaPoly will always use a native JVM and thereby utilize native capabilities like multi-core support (which is otherwise unavailable to Javascript applications).[6] Similarly, JavaPoly will take advantage of native Java support within a web browser, if such support is available. If no suitable alternatives are detected, JavaPoly will call into a Doppio VM,[7][8] which provides execution support on legacy browsers.

References

  1. "Java Polyfill for the Browser". https://news.ycombinator.com/item?id=11655582. Retrieved 9 May 2016. 
  2. "Java(Script) in the Browser". 10 May 2016. https://www.javapoly.com/. Retrieved 18 July 2016. 
  3. Saurel, Sylvain (20 May 2016). "Use your Java classes in the browser with JavaPoly.js". http://www.ssaurel.com/blog/use-your-java-classes-in-the-browser-with-javapoly-js/. Retrieved 18 July 2016. 
  4. "JavaPoly.js Technical Details". 10 May 2016. https://www.javapoly.com/details.html. Retrieved 18 July 2016. 
  5. Krill, Paul (13 May 2016). "JavaPoly.js imports existing Java code and invokes it directly from JavaScript". InfoWorld. http://www.infoworld.com/article/3069995/java/new-javascript-library-brings-java-to-browsers-without-applets.html. Retrieved 18 July 2016. 
  6. "javapoly". NPMJS. 18 July 2016. https://www.npmjs.com/package/javapoly. Retrieved 18 July 2016. 
  7. "Doppio JVM". PLASMA lab at University of Massachusetts Amherst. 24 Dec 2017. http://doppiojvm.org. Retrieved 24 Dec 2017. 
  8. Vilk, John; Berger, Emery (2014). "Doppio: Breaking the Browser Language Barrier". Proceedings of the 2014 Conference on Programming Language Design and Implementation (PLDI) (ACM). doi:10.1145/2594291.2594293. https://plasma-umass.github.io/doppio-demo/paper.pdf.