java.lang.NoClassDefFoundError: java/applet/Applet on modern JDKs (Java 26+) due to legacy Applet references
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- Ein halber Tag
- Anfängerfreundlichkeit
- 35/100
Rechercherichtung
The stack trace points to BasePosRobotIT.setUpBase at line 83, which is in the reporter's own project, not in AssertJ Swing's sources. First, grep the repository for java.applet and JApplet references and run the test suite on JDK 26 to confirm where the missing class is loaded. If the reference only exists in the reporter's code, the fix belongs there, and the issue should be narrowed. Done when the cause is identified and either a library change or a clear out-of-scope conclusion is recorded.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Description
When running UI automation tests built on top of AssertJ Swing under modern JDK environments, specifically JDK 26 or newer, the test suite crashes during initialization with a java.lang.NoClassDefFoundError targeting java/applet/Applet.
The Applet API has been completely removed from the standard JDK classpath in Java 26 under [JEP 504: Remove the Applet API].
Since AssertJ Swing still carries legacy references, internal fixtures, or utilities inherited from the original FEST Swing codebase that depend on java.applet.Applet, the framework fails immediately upon class loading.
Stack Trace
java.lang.NoClassDefFoundError: java/applet/Applet
at io.github.kriolos.opos.automation.BasePosRobotIT.setUpBase(BasePosRobotIT.java:83)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1612)
Caused by: java.lang.ClassNotFoundException: java.applet.Applet
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:580)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:502)
Environment
- Java Version: JDK 26+ (JEP 504 compliant)
- OS: Agnostic
- Library: AssertJ Swing (Core automation engine)
Expected Behavior
AssertJ Swing should be executable on modern standard runtimes (JDK 26+) without requiring or resolving deprecated and now-deleted packages like java.applet.*.
Suggested Fix
- Completely remove or refactor any code paths, modules, or internal test runners (such as legacy Applet viewers/fixtures) that reference
java.applet.Appletorjavax.swing.JApplet. - Fully decouple standard desktop
JFramecomponents from any Applet-based class loading mechanisms to restore compatibility with current and future JDK ecosystems.
- Vorherrschende Sprache
- Java
- Sterne
- 121
- Forks
- 52
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus assertj/assertj-swing
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
assertj/assertj-swing#279 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 48/100
assertj/assertj-swing#278 · 1 Kommentar ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 30/100
assertj/assertj-swing#276 · 1 Kommentar ·
-
Update unit test to avoid deprecated `ExpectedException.none()` by using `Assert.assertThrows()`Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
assertj/assertj-swing#275 ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
assertj/assertj-swing#277 · 1 Kommentar ·
Alle Issues in assertj/assertj-swing
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 68/100
quarkusio/quarkus-agent-mcp#296 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement web-ui
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 67/100
jenkinsci/jenkins#27583 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
apache/rocketmq-dashboard#7302 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
area: android good first issue help wanted testing
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Gautam-aman/ResQNet#56 ·
Maintainer antworten meist innerhalb von 1 Tag