The Life of Java Applets
Applets were probably one of the driving forces behind the wide scale adoption of Java when it was formally released in January 1996.
In 1994, a team of Java developers started writing a modular, extensible Java-based web browser called WebRunner. It was publicly demonstrated in 1995 and thereafter renamed HotJava when it was officially announced in May 1995 at the SunWorld conference.
It was the first browser to support Java applets.
The HotJava browser was Sun’s demonstration platform for Java and showed off its capabilities as a platform-independent programming language. One of the really cool things that the HotJava browser could do was run applets. These were Java programs that were delivered to the user within a web page. They were executed by a Java Virtual Machine (JVM) in a separate process separate to the web browser itself. A Java applet could be displayed inside a frame of the web page or even a new application window.
At the time, applets were much faster than JavaScript, and could also access the 3D hardware acceleration capabilities of the native machine. This made applets well-suited for computation-intensive graphical programs.
A Java applet is a Java program that is launched from HTML and run in a web browser. It takes code from a server and runs in a web browser. It can provide web applications with interactive features that cannot be provided by HTML.
Since Java’s bytecode is platform-independent, Java applets can be executed by browsers running on all supported operating systems.
The Death of Java Applets
There were so many, many problems with applets.
Beginning in 2013, major web browsers began to phase out support for the underlying technology applets used to run, with applets becoming completely unable to be run by 2015–2017. Java applets were deprecated by Java 9 in 2017
In essence, applets have become irrelevant. Although the applet API was previously deprecated, JEP 398: Deprecate the Applet API for Removal takes the final step by deprecating it for removal from the Java language.
This means the removal of the following classes and interfaces from the standard Java API:
java.applet.Applet
java.applet.AppletStub
java.applet.AppletContext
java.applet.AudioClip
javax.swing.JApplet
java.beans.AppletInitializer
java.beans.Beans
javax.swing.RepaintManager
javax.naming.Context
Conclusion
Don’t be tempted to use applets! And if you have them, re-code them! In the future we’ll look at some of the alternatives.
Stay safe, and see you soon! As always, please share your comments and questions.