RFR: 8359053: Implement JEP 504 - Remove the Applet API [v3]

Kevin Rushforth kcr at openjdk.org
Tue Jun 10 21:36:30 UTC 2025


On Tue, 10 Jun 2025 21:28:56 GMT, Phil Race <prr at openjdk.org> wrote:

>> This is the implementation of JEP 504 - Remove the Applet API.
>> API changes are
>> - Remove the entire java.applet package
>> - Remove the javax/swing/JApplet class
>> - Remove applet related APIs in java.beans
>> - Update javadoc referring to applets, including one gif image - now changed to an svg image
>> - 
>> Other changes are
>> - Remove references to the removed classes
>> - Remove obsolete tests
>> - Update obsolete code comments
>> 
>> sun.awt.AppContext is even more obsolete now than it was before, but eliminating uses of that will be is not required,
>> and will be follow-on internal clean up, at a later date, under unrelated bug ids, and likely not completed in the same
>> release as this JEP is integrated.
>> 
>> I have extensively tested this - running all the automated tests used by CI tiers 1 to 8.
>
> Phil Race has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8359053

The following files still reference the now-removed applet classes and will fail to compile. Are they not included in any tier testing?


test/hotspot/jtreg/vmTestbase/jit/misctests/fpustack/GraphApplet.java
test/hotspot/jtreg/vmTestbase/jit/misctests/fpustack/GraphPanel.java
test/hotspot/jtreg/vmTestbase/jit/misctests/fpustack/layout.java
test/jdk/java/beans/Performance/TestIntrospector.java


The following javadoc tests reference the java.applet package. I don't know whether or not this will cause test failures:


test/langtools/jdk/javadoc/doclet/JavascriptWinTitle/package-list
test/langtools/jdk/javadoc/doclet/testLinkOption/jdk/package-list
test/langtools/jdk/javadoc/doclet/testModules/jdk/element-list


The following refer to applets in API documentation, so you might consider updating the docs:

src/java.desktop/share/classes/java/awt/doc-files/FocusSpec.html
src/java.desktop/share/classes/java/awt/doc-files/Modality.html


In addition, I found several references to applets in comments. Many / most of these seem OK, but you might want to look at a few to see if you think they might worth modifying. The last two in particular might be good candidates for renaming, although that is just cosmetic at this point:


src/demo/share/jfc/J2Ddemo/java2d/RunWindow.java
src/demo/share/jfc/J2Ddemo/java2d/Tools.java
src/demo/share/jfc/SwingSet2/SwingSet2.java
src/java.desktop/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java
test/jdk/java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest.java
test/jdk/java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest1.java

-------------

PR Comment: https://git.openjdk.org/jdk/pull/25698#issuecomment-2960635068


More information about the client-libs-dev mailing list