Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Java virtual machine
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==JVM in the web browser== At the start of the Java platform's lifetime, the JVM was marketed as a web technology for creating [[Rich web application|Rich Web Applications]]. {{As of|2018}}, most web browsers and operating systems bundling web browsers do not ship with a Java [[plug-in (computing)|plug-in]], nor do they permit side-loading any non-[[Adobe Flash|Flash]] plug-in. The Java browser plugin was deprecated in [[JDK]] 9.<ref name="ars-nopluginjdk9">{{cite web |url=https://arstechnica.com/information-technology/2016/01/oracle-deprecates-the-java-browser-plugin-prepares-for-its-demise/ |title=Oracle deprecates the Java browser plugin, prepares for its demise |website=Ars Technica |date=28 January 2016 |access-date=15 April 2016 |archive-date=8 April 2016 |archive-url=https://web.archive.org/web/20160408145301/http://arstechnica.com/information-technology/2016/01/oracle-deprecates-the-java-browser-plugin-prepares-for-its-demise/ |url-status=live }}</ref> The [[NPAPI]] Java browser plug-in was designed to allow the JVM to execute so-called [[Java applets]] embedded into HTML pages. For browsers with the plug-in installed, the applet is allowed to draw into a rectangular region on the page assigned to it. Because the plug-in includes a JVM, Java applets are not restricted to the Java programming language; any language targeting the JVM may run in the plug-in. A restricted set of APIs allow applets access to the user's microphone or 3D acceleration, although applets are not able to modify the page outside its rectangular region. [[Adobe Flash Player]], the main competing technology, works in the same way in this respect. {{As of|June 2015}} according to W3Techs, Java applet and [[Microsoft Silverlight|Silverlight]] use had fallen to 0.1% each for all web sites, while Flash had fallen to 10.8%.<ref>{{cite web|url=http://w3techs.com/technologies/history_overview/client_side_language/all/y |title=Historical yearly trends in the usage of client-side programming languages, June 2015 |publisher=W3techs.com |access-date=2015-06-26}}</ref> ===JavaScript JVMs and interpreters=== Since May 2016, JavaPoly allows users to import unmodified Java libraries, and invoke them directly from JavaScript. JavaPoly allows websites to use unmodified Java libraries, even if the user does not have Java installed on their computer.<ref>{{cite magazine|last= Krill|first= Paul|title= JavaPoly.js imports existing Java code and invokes it directly from JavaScript|url= http://www.infoworld.com/article/3069995/java/new-javascript-library-brings-java-to-browsers-without-applets.html|magazine= InfoWorld|access-date= 18 July 2016|date= 13 May 2016|archive-date= 25 July 2016|archive-url= https://web.archive.org/web/20160725024906/http://www.infoworld.com/article/3069995/java/new-javascript-library-brings-java-to-browsers-without-applets.html|url-status= live}}</ref> ===Transpilation to JavaScript=== With the continuing improvements in JavaScript execution speed, combined with the increased use of mobile devices whose web browsers do not implement support for plugins, there are efforts to target those users through [[Transpile|transpilation]] to JavaScript. It is possible to either transpile the source code or JVM bytecode to JavaScript. Compiling the JVM bytecode, which is universal across JVM languages, allows building upon the language's existing compiler to bytecode. The main JVM bytecode to JavaScript transpilers are TeaVM,<ref>{{cite web |url = http://teavm.org/ |title = TeaVM project home page |publisher = Teavm.org |access-date = 2015-06-26 |archive-date = 2015-06-27 |archive-url = https://web.archive.org/web/20150627045343/http://teavm.org/ |url-status = live }}</ref> the compiler contained in Dragome Web SDK,<ref>{{cite web |url = http://www.dragome.com/ |title = Dragome Web SDK |publisher = Dragome.com |access-date = 2015-06-26 |archive-date = 2015-08-01 |archive-url = https://web.archive.org/web/20150801074231/http://dragome.com/ |url-status = live }}</ref> Bck2Brwsr,<ref>{{cite web |url = http://wiki.apidesign.org/wiki/Bck2Brwsr |title = Bck2Brwsr - APIDesign |publisher = Wiki.apidesign.org |access-date = 2015-06-26 |archive-date = 2015-06-27 |archive-url = https://web.archive.org/web/20150627062724/http://wiki.apidesign.org/wiki/Bck2Brwsr |url-status = live }}</ref> and j2js-compiler.<ref>Wolfgang Kuehn (decatur). [https://github.com/decatur/j2js-compiler j2js-compiler] {{Webarchive|url=https://web.archive.org/web/20130929131436/https://github.com/decatur/j2js-compiler |date=2013-09-29 }} GitHub</ref> Leading transpilers from JVM languages to JavaScript include the Java-to-JavaScript transpiler contained in [[Google Web Toolkit]], Clojurescript (Clojure), GrooScript (Apache Groovy), Scala.js (Scala) and others.<ref>{{cite web |url = https://github.com/jashkenas/coffeescript/wiki/list-of-languages-that-compile-to-js |title = List of languages that compile to JS Β· jashkenas/coffeescript Wiki Β· GitHub |publisher = Github.com |date = 2015-06-19 |access-date = 2015-06-26 |archive-date = 2020-01-31 |archive-url = https://web.archive.org/web/20200131233044/https://github.com/jashkenas/coffeescript/wiki/List-of-languages-that-compile-to-JS |url-status = live }}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)