Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8345525

JEP 504: Remove the Applet API

XMLWordPrintable

    • Icon: JEP JEP
    • Resolution: Unresolved
    • Icon: P3 P3
    • None
    • client-libs
    • Feature
    • Open
    • SE
    • client dash libs dash dev at openjdk dot org
    • S
    • S
    • 504

      Summary

      Remove the Applet API, which was deprecated for removal in JDK 17 (2021). It is obsolete because neither recent JDK releases nor current web browsers support applets.

      Motivation

      There is no reason to keep the unused and unusable Applet API.

      Description

      We will remove the following elements of the Java Platform API:

      • The entire [<code class="prettyprint" >java.applet</code>] package, consisting of:

        java.applet.Applet java.applet.AppletContext java.applet.AppletStub java.applet.AudioClip

      • These additional classes:

        java.beans.AppletInitializer javax.swing.JApplet

      • Any remaining API elements that reference the above classes and interfaces, including methods and fields in:

        java.beans.Beans javax.naming.Context javax.swing.RepaintManager

      Testing

      Any tests which rely on the Applet API will need to be updated, disabled, or removed. For jtreg-based tests in the main-line JDK repository, this work is almost complete. Most such tests merely use the Applet API for convenience; few of them explicitly test the API.

      Risks and Assumptions

      • Given that it is largely unusable, there are no substantial risks to user applications in removing the Applet API.

      • Code that still uses the Applet API will either stay on older releases or will migrate to some other API. In cases where the Applet class serves as a user-interface container component, the AWT API provides several alternatives.

      • The [<code class="prettyprint" >jtreg</code>] tool references the Applet API, so it must be built using a JDK that still supports applets. This is required anyway, however, since jtreg must be able to test JDK release trains older than what the current javac compiler supports. At run time, jtreg only loads the Applet API when encountering an applet-based test, so a single jtreg build can support older JDK builds as well as newer builds which omit the Applet API.

            prr Philip Race
            prr Philip Race
            Philip Race Philip Race
            Kevin Rushforth, Victor Dyakov
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated: