Java applet: Difference between revisions
Jump to navigation
Jump to search
imported>Racecard Undid revision 1294958602 by Collisteru (talk) Even though they are deprecated, they don't cease being small applications written in Java. |
imported>JJMC89 bot III m Moving Category:Java platform to Category:Java (software platform) per Wikipedia:Categories for discussion/Speedy |
||
| Line 2: | Line 2: | ||
{{Use dmy dates|date=June 2023}} | {{Use dmy dates|date=June 2023}} | ||
[[File:Java applet.png|thumb|A Java applet that was created as supplementary demonstration material for a scientific publication]] | [[File:Java applet.png|thumb|A Java applet that was created as supplementary demonstration material for a scientific publication]] | ||
[[File:OpenAstexViewer.jpg|thumb|A Java applet that uses 3D [[hardware acceleration]] to visualize 3D files in [[Protein Data Bank (file format)|.pdb format]] downloaded from a server<ref>{{cite web|url= | [[File:OpenAstexViewer.jpg|thumb|A Java applet that uses 3D [[hardware acceleration]] to visualize 3D files in [[Protein Data Bank (file format)|.pdb format]] downloaded from a server<ref>{{cite web|url=https://openastexviewer.net/web/|title=The home site of the 3D protein viewer (Openastexviewer) under LGPL|access-date=21 September 2009|archive-url=https://web.archive.org/web/20090801135810/http://www.openastexviewer.net/web/|archive-date=1 August 2009|url-status=dead}}</ref>]] | ||
[[File:Cardiac cells applet.png|thumb|120px|Using applet for nontrivial animation illustrating biophysical topic (randomly moving ions pass through voltage gates)<ref name='heart'>{{Cite web|url= | [[File:Cardiac cells applet.png|thumb|120px|Using applet for nontrivial animation illustrating biophysical topic (randomly moving ions pass through voltage gates)<ref name='heart'>{{Cite web|url=https://thevirtualheart.org/CAPindex.html|title=Generation of an action potential in cardiac cells using interactive java applet. Excitable media. movies excitable media Fitzhug nagumo beeler reuter luo rudy model mathematical cell modeling|website=Thevirtualheart.org|access-date=22 March 2022}}</ref>]] | ||
[[File:Mandelbrot java applet.png|thumb|Using a Java applet for computation{{snd}} intensive visualization of the [[Mandelbrot set]]<ref>{{cite web|url=http://math.uchicago.edu/~dannyc/fractals/simple.html|title=The home site of the Mandelbrot set applet under GPL|access-date=29 July 2013|archive-url=https://web.archive.org/web/20130508054436/http://math.uchicago.edu/~dannyc/fractals/simple.html|archive-date=8 May 2013|url-status=dead}}</ref>]] | [[File:Mandelbrot java applet.png|thumb|Using a Java applet for computation{{snd}} intensive visualization of the [[Mandelbrot set]]<ref>{{cite web|url=http://math.uchicago.edu/~dannyc/fractals/simple.html|title=The home site of the Mandelbrot set applet under GPL|access-date=29 July 2013|archive-url=https://web.archive.org/web/20130508054436/http://math.uchicago.edu/~dannyc/fractals/simple.html|archive-date=8 May 2013|url-status=dead}}</ref>]] | ||
[[File:ChessApplet.png|thumb|Applets' running speed is sufficient for making e.g. nontrivial computer games that play [[chess]].<ref>{{cite web|url=http://english.op.org/~peter/ChessApp/ |title=The home site of the chess applet under BSD |url-status=dead |archive-url=https://web.archive.org/web/20090907072956/http://english.op.org/~peter/ChessApp/ |archive-date= 7 September 2009 }}</ref>]] | [[File:ChessApplet.png|thumb|Applets' running speed is sufficient for making e.g. nontrivial computer games that play [[chess]].<ref>{{cite web|url=http://english.op.org/~peter/ChessApp/ |title=The home site of the chess applet under BSD |url-status=dead |archive-url=https://web.archive.org/web/20090907072956/http://english.op.org/~peter/ChessApp/ |archive-date= 7 September 2009 }}</ref>]] | ||
| Line 13: | Line 13: | ||
At the time of their introduction, the intended use was for the user to launch the applet from a [[web page]], and for the applet to then execute within a [[Java virtual machine]] (JVM) in a [[Process (computing)|process]] separate from the [[web browser]] itself. A Java applet could appear in a frame of the web page, a new application window, a program from [[Sun Microsystems|Sun]] called appletviewer,<ref>{{Cite web |title=appletviewer — Java SE 8 |url=https://docs.oracle.com/javase/8/docs/technotes/tools/windows/appletviewer.html |access-date=December 5, 2023 |publisher=Oracle}}</ref> or a stand-alone tool for testing applets.{{What?|date=December 2023|reason=A standalone tool like what?}} | At the time of their introduction, the intended use was for the user to launch the applet from a [[web page]], and for the applet to then execute within a [[Java virtual machine]] (JVM) in a [[Process (computing)|process]] separate from the [[web browser]] itself. A Java applet could appear in a frame of the web page, a new application window, a program from [[Sun Microsystems|Sun]] called appletviewer,<ref>{{Cite web |title=appletviewer — Java SE 8 |url=https://docs.oracle.com/javase/8/docs/technotes/tools/windows/appletviewer.html |access-date=December 5, 2023 |publisher=Oracle}}</ref> or a stand-alone tool for testing applets.{{What?|date=December 2023|reason=A standalone tool like what?}} | ||
Java applets were introduced in the first version of the Java language, which was released in 1995. Beginning in 2013, major web browsers began to phase out support for [[NPAPI#Support/deprecation|NPAPI]], the underlying technology applets used to run | Java applets were introduced in the first version of the Java language, which was released in 1995. Beginning in 2013, major web browsers began to phase out support for [[NPAPI#Support/deprecation|NPAPI]], the underlying technology applets used to run, with applets becoming completely unable to be run by 2015–2017. Java applets were [[deprecation|deprecated]] by Java 9 in 2017,<ref>{{cite web|url=https://www.oracle.com/technetwork/java/javase/9-deprecated-features-3745636.html|title=Java 9 Release Notes|website=Oracle.com}}</ref><ref>{{Cite web|url=https://openjdk.java.net/jeps/289|title=JEP 289: Deprecate the Applet API|website=Openjdk.java.net|access-date=22 March 2022}}</ref><ref>{{cite web|url=https://blogs.oracle.com/java-platform-group/entry/moving_to_a_plugin_free|title=JPG blog: Moving to a Plugin-Free Web|website=Blogs.oracle.com}}</ref><ref>{{cite web|url=https://blogs.oracle.com/java-platform-group/entry/further_updates_to_moving_to|title=JPG blog: Further Updates to 'Moving to a Plugin-Free Web'|website=Blogs.oracle.com}}</ref><ref>{{cite web|url=https://www.oracle.com/technetwork/java/javase/javaclientroadmapupdate2018mar-4414431.pdf|title=Java Client Roadmap Update|website=Oracle.com|access-date=22 March 2022}}</ref> ''deprecated for removal'' by Java 17 in 2021,<ref>{{Cite web |orig-date=2024-12-04 |title=JEP 398: Deprecate the Applet API for Removal |url=https://openjdk.org/jeps/398 |access-date=2025-10-31 |website=openjdk.org}}</ref> and removed by Java 26 in 2026.<ref>{{Cite web |title=So Long and Thanks for All the Applets – Inside.java |url=https://inside.java/2025/12/03/applet-removal/ |access-date=2025-12-15 |website=inside.java}}</ref><ref>{{Cite web |title=JEP 504: Remove the Applet API |url=https://openjdk.org/jeps/504 |access-date=2025-10-31 |website=openjdk.org}}</ref> | ||
Java applets were usually written in Java, but other languages such as [[Jython]], [[JRuby]], [[Pascal (programming language)|Pascal]],<ref>{{Cite web|url=https://wiki.freepascal.org/FPC_JVM|title=FPC JVM – Free Pascal wiki|website=Wiki.freepascal.org|access-date=22 March 2022}}</ref> [[Scala (programming language)|Scala]], [[NetRexx]], or [[Eiffel (programming language)|Eiffel]] (via [[SmartEiffel]]) could be used as well. | Java applets were usually written in Java, but other languages such as [[Jython]], [[JRuby]], [[Pascal (programming language)|Pascal]],<ref>{{Cite web|url=https://wiki.freepascal.org/FPC_JVM|title=FPC JVM – Free Pascal wiki|website=Wiki.freepascal.org|access-date=22 March 2022}}</ref> [[Scala (programming language)|Scala]], [[NetRexx]], or [[Eiffel (programming language)|Eiffel]] (via [[SmartEiffel]]) could be used as well. | ||
| Line 43: | Line 43: | ||
== Embedding into a web page == | == Embedding into a web page == | ||
The applet would be displayed on the web page by making use of the deprecated <code>[[Img (HTML element)|applet]]</code> HTML element,<ref>{{Cite web|url= | The applet would be displayed on the web page by making use of the deprecated <code>[[Img (HTML element)|applet]]</code> HTML element,<ref>{{Cite web|url=https://www.w3.org/TR/html401/struct/objects.html#edef-APPLET|title=Objects, Images, and Applets in HTML documents|website=W3.org|access-date=22 March 2022}}</ref> or the recommended <code>object</code> element.<ref>{{Cite web|url=https://www.w3.org/TR/html401/struct/objects.html#edef-OBJECT|title=Objects, Images, and Applets in HTML documents|website=W3.org|access-date=22 March 2022}}</ref> The <code>embed</code> element can be used<ref name="java">{{cite web|url=http://www.java.com/en/download/manual.jsp |title=Java Downloads for All Operating Systems |publisher=Java.com |date=14 August 2012 |access-date=2013-06-14}}</ref> with Mozilla family browsers (<code>embed</code> was deprecated in HTML 4 but is included in HTML 5). This specifies the applet's source and location. Both <code>object</code> and <code>embed</code> tags can also download and install Java virtual machine (if required) or at least lead to the plugin page. <code>applet</code> and <code>object</code> tags also support loading of the serialized applets that start in some particular (rather than initial) state. Tags also specify the message that shows up in place of the applet if the browser cannot run it due to any reason. | ||
However, despite <code>object</code> being officially a recommended tag in 2010, the support of the <code>object</code> tag was not yet consistent among browsers and Sun kept recommending the older <code>applet</code> tag for deploying in multibrowser environments,<ref name="ja">{{Cite web |url=http://download.java.net/jdk7/docs/technotes/guides/plugin/developer_guide/using_tags.html#object |title=Sun's position on applet and object tags |access-date=14 January 2010 |archive-url=https://web.archive.org/web/20100609015456/http://download.java.net/jdk7/docs/technotes/guides/plugin/developer_guide/using_tags.html#object |archive-date=9 June 2010 |url-status=dead }}</ref> as it remained the only tag consistently supported by the most popular browsers. To support multiple browsers, using the <code>object</code> tag to embed an applet would require JavaScript (that recognizes the browser and adjusts the tag), usage of additional browser-specific tags or delivering adapted output from the server side. | However, despite <code>object</code> being officially a recommended tag in 2010, the support of the <code>object</code> tag was not yet consistent among browsers and Sun kept recommending the older <code>applet</code> tag for deploying in multibrowser environments,<ref name="ja">{{Cite web |url=http://download.java.net/jdk7/docs/technotes/guides/plugin/developer_guide/using_tags.html#object |title=Sun's position on applet and object tags |access-date=14 January 2010 |archive-url=https://web.archive.org/web/20100609015456/http://download.java.net/jdk7/docs/technotes/guides/plugin/developer_guide/using_tags.html#object |archive-date=9 June 2010 |url-status=dead }}</ref> as it remained the only tag consistently supported by the most popular browsers. To support multiple browsers, using the <code>object</code> tag to embed an applet would require JavaScript (that recognizes the browser and adjusts the tag), usage of additional browser-specific tags or delivering adapted output from the server side. | ||
| Line 50: | Line 50: | ||
== Advantages == | == Advantages == | ||
A Java applet could have any or all of the following advantages:<ref>[ | A Java applet could have any or all of the following advantages:<ref>[https://download.oracle.com/javase/tutorial/deployment/applet/index.html Oracle official] overview on Java applet technology</ref> | ||
* It was simple to make it work on FreeBSD, Linux, Microsoft Windows and macOS{{snd}} that is, to make it cross-platform. Applets were supported by most [[web browser]]s through the first decade of the 21st century; since then, however, most browsers have dropped applet support for security reasons. | * It was simple to make it work on FreeBSD, Linux, Microsoft Windows and macOS{{snd}} that is, to make it cross-platform. Applets were supported by most [[web browser]]s through the first decade of the 21st century; since then, however, most browsers have dropped applet support for security reasons. | ||
| Line 74: | Line 74: | ||
== Compatibility-related lawsuits == | == Compatibility-related lawsuits == | ||
[[Sun Microsystems|Sun]] made considerable efforts to ensure compatibility is maintained between Java versions as they evolve, enforcing Java portability by law if required. Oracle seems to be continuing the same strategy. | [[Sun Microsystems|Sun]] made considerable efforts to ensure compatibility is maintained between Java versions as they evolve, enforcing Java portability by law if required. Oracle seems to be continuing the same strategy. {{citation needed|date=March 2026}} | ||
=== 1997: Sun vs Microsoft === | === 1997: Sun vs Microsoft === | ||
| Line 83: | Line 83: | ||
== Security == | == Security == | ||
There were two applet types with very different security models: signed applets and unsigned applets.<ref>{{Cite web|url=https://docs.oracle.com/javase/tutorial/deployment/applet/security.html|title=What Applets Can and Cannot Do (The Java Tutorials > Deployment > Java Applets)|website=Docs.oracle.com|access-date=22 March 2022}}</ref> Starting with Java SE 7 Update 21 (April 2013) applets and Web-Start Apps are encouraged to be signed with a trusted certificate, and warning messages appear when running unsigned applets.<ref>{{Cite web|url = https://www.oracle.com/technetwork/java/javase/tech/java-code-signing-1915323.html#60|title = Java Applet & Web Start – Code Signing|access-date = 28 February 2014|publisher = Oracle}}</ref> Further, starting with Java 7 Update 51 unsigned applets were blocked by default; they could be run by creating an exception in the Java Control Panel.<ref>{{Cite web|url = http://java.com/en/download/help/appsecuritydialogs.xml|title = What should I do when I see a security prompt from Java?|access-date = 28 February 2014|publisher = Oracle}}</ref> | |||
There were two applet types with very different security models: signed applets and unsigned applets.<ref>{{Cite web|url=https://docs.oracle.com/javase/tutorial/deployment/applet/security.html|title=What Applets Can and Cannot Do (The Java Tutorials > Deployment > Java Applets)|website=Docs.oracle.com|access-date=22 March 2022}}</ref> Starting with Java SE 7 Update 21 (April 2013) applets and Web-Start Apps are encouraged to be signed with a trusted certificate, and warning messages appear when running unsigned applets.<ref>{{Cite web|url = | |||
=== Unsigned ===<!-- I didn't really bother with cleaning up the tense of these sections: they need a full rewrite, due to substantial NPOV problems --> | === Unsigned ===<!-- I didn't really bother with cleaning up the tense of these sections: they need a full rewrite, due to substantial NPOV problems --> | ||
| Line 128: | Line 127: | ||
<!-- Please add no links to individual, especially commercial applets here. Too many. --> | <!-- Please add no links to individual, especially commercial applets here. Too many. --> | ||
* [http://www.java.com/download/ Latest version of Sun Microsystems' Java Virtual Machine] (includes browser plug-ins for running Java applets in most web browsers). | * [http://www.java.com/download/ Latest version of Sun Microsystems' Java Virtual Machine] (includes browser plug-ins for running Java applets in most web browsers). | ||
* [ | * [https://docs.oracle.com/javase/tutorial/deployment/applet/index.html Information about writing applets from Oracle] | ||
* [ | * [https://java.sun.com/applets/jdk/1.4/index.html Demonstration applets from Sun Microsystems] ([[JDK]] 1.4{{snd}} include source code) | ||
{{Java (Sun)}} | {{Java (Sun)}} | ||
| Line 136: | Line 135: | ||
{{DEFAULTSORT:Applet}} | {{DEFAULTSORT:Applet}} | ||
[[Category:Java (programming language)]] | [[Category:Java (programming language)]] | ||
[[Category:Java platform]] | [[Category:Java (software platform)]] | ||
[[Category:Web 1.0]] | [[Category:Web 1.0]] | ||