JavaPoly
Original author(s) | Jim Sproch |
---|---|
Initial release | May 9, 2016[1] |
Development status | Active |
Written in | JavaScript |
Operating system | OS X, Linux, Solaris, FreeBSD, OpenBSD, Microsoft Windows |
Website |
javapoly |
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 unavaiable 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, which provides execution support on legacy browsers.
References
- ↑ "Java Polyfill for the Browser". Retrieved 9 May 2016.
- ↑ "Java(Script) in the Browser". 10 May 2016. Retrieved 18 July 2016.
- ↑ Saurel, Sylvain (20 May 2016). "Use your Java classes in the browser with JavaPoly.js". Retrieved 18 July 2016.
- ↑ "JavaPoly.js Technical Details". 10 May 2016. Retrieved 18 July 2016.
- ↑ Krill, Paul (13 May 2016). "JavaPoly.js imports existing Java code and invokes it directly from JavaScript". InfoWorld. Retrieved 18 July 2016.
- ↑ "javapoly". NPMJS. 18 July 2016. Retrieved 18 July 2016.