java.lang.NoClassDefFoundError: java/applet/Applet on modern JDKs (Java 26+) due to legacy Applet references
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 35/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Java
- Stelle
- 121
- Fork
- 52
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di assertj/assertj-swing
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
assertj/assertj-swing#279 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 48/100
assertj/assertj-swing#278 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
assertj/assertj-swing#276 · 1 commento ·
-
Update unit test to avoid deprecated `ExpectedException.none()` by using `Assert.assertThrows()`Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
assertj/assertj-swing#275 ·
-
how to test when headless?Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
assertj/assertj-swing#277 · 1 commento ·
Tutte le issue di assertj/assertj-swing
Issue simili
-
status: team-only type: dependency-upgrade
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
spring-projects/spring-boot#52143 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area/frontend good first issue kind/cooldown
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
kestra-io/kestra#20704 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno