Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/main/java/org/javademos/init/Java17.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.javademos.java17.jep356.RandomGenerators17;
import org.javademos.java17.jep382.MacosRenderingPipelineDemo;
import org.javademos.java17.jep391.MacOsAarch64PortDemo;
import org.javademos.java17.jep398.DeprecateAppletApiForRemovalDemo;
import org.javademos.java17.jep403.StronglyEncapsulateInternalsDemo;
import org.javademos.java17.jep406.PatternMatchingForSwitchPreview;
import org.javademos.java17.jep407.RemoveRmiActivationDemo;
Expand Down Expand Up @@ -41,6 +42,8 @@ public static ArrayList<IDemo> getDemos() {
java17DemoPool.add(new MacosRenderingPipelineDemo());
// JEP 391
java17DemoPool.add(new MacOsAarch64PortDemo());
// JEP 398
java17DemoPool.add(new DeprecateAppletApiForRemovalDemo());
// JEP 403
java17DemoPool.add(new StronglyEncapsulateInternalsDemo());
// JEP 406
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package org.javademos.java17.jep398;

import org.javademos.commons.IDemo;

/// Demo for JDK 17 feature JEP 398 - Deprecate the Applet API for Removal.
///
/// JEP history:
/// - JDK 17: [JEP 398 - Deprecate the Applet API for Removal](https://openjdk.org/jeps/398)
/// - JDK 9: [JEP 289 - Deprecate the Applet API](https://openjdk.org/jeps/289) (Initial step)
///
/// Further reading:
/// - [Java applet - wiki page](https://en.wikipedia.org/wiki/Java_applet)
///
/// @author Alexander Schneider @ab-schneider
public class DeprecateAppletApiForRemovalDemo implements IDemo {
@Override
public void demo() {
info(398);

// The Applet API (java.applet.Applet) existed to run Java code inside browsers via the NPAPI plug-in.
// As all major browsers removed NPAPI (Chrome 2015, Firefox 2017, Edge never),
// the API became unusable: deprecated in JDK 9 (JEP 289), marked for removal in JDK 17 (JEP 398),
// and removed in JDK 26 (JEP 504).
//
// In case remaining uses of these APIs do exist, developers can suppress compiler warnings
// via the @SuppressWarnings("removal") annotation or the -Xlint:-removal command-line option of the javac compiler.
}
}
8 changes: 8 additions & 0 deletions src/main/resources/JDK17Info.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@
"link": false,
"code": false
},
{
"jep": 398,
"jdk": 17,
"name": "JEP 398 - Deprecate the Applet API for Removal",
"dscr": "Deprecate the Applet API for removal. It is essentially irrelevant since all web-browser vendors have removed support for Java browser plug-ins",
"link": false,
"code": false
},
{
"jep": 403,
"jdk": 17,
Expand Down