Class AppletApiRemovalExamples
java.lang.Object
net.jrodolfo.java_evolution.java26.applet_api_removal.AppletApiRemovalExamples
Demonstrates removal of the Applet API in Java 26.
This example does not try to run an applet or restore browser-plugin-era
tooling. Instead, it writes a tiny legacy source file that imports
java.applet.Applet, compiles it with the current JDK, and captures the
compiler failure. That makes the removal visible without depending on old
browser integrations or obsolete platform modules.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordResult from compiling obsolete applet source. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncompileLegacyApplet(Path workspace) Compiles a tiny obsolete applet source file with the active JDK.Explains what applets represented historically.Describes the Java 26 change.Source that would compile only on JDKs wherejava.applet.Appletstill existed.Explains the learning value.
-
Constructor Details
-
AppletApiRemovalExamples
public AppletApiRemovalExamples()
-
-
Method Details
-
compileLegacyApplet
public AppletApiRemovalExamples.CompilationResult compileLegacyApplet(Path workspace) throws IOException, InterruptedException Compiles a tiny obsolete applet source file with the active JDK.- Parameters:
workspace- temporary directory for generated source files- Returns:
- compilation result containing exit code and compiler output
- Throws:
IOException- when the source file cannot be written orjavaccannot be startedInterruptedException- when waiting for the child compiler is interrupted
-
legacyAppletSource
Source that would compile only on JDKs wherejava.applet.Appletstill existed.- Returns:
- tiny obsolete applet source
-
historicalContext
Explains what applets represented historically.- Returns:
- a short historical note
-
java26Change
-
migrationLesson
-