java.lang.NoClassDefFoundError: java/applet/Applet on modern JDKs (Java 26+) due to legacy Applet references
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- Meio dia
- Facilidade para iniciantes
- 35/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Java
- Estrelas
- 121
- Forks
- 52
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de assertj/assertj-swing
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
assertj/assertj-swing#279 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 48/100
assertj/assertj-swing#278 · 1 comentário ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 30/100
assertj/assertj-swing#276 · 1 comentário ·
-
Update unit test to avoid deprecated `ExpectedException.none()` by using `Assert.assertThrows()`Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
assertj/assertj-swing#275 ·
-
how to test when headless?Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 35/100
assertj/assertj-swing#277 · 1 comentário ·
Todas as issues de assertj/assertj-swing
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
checkstyle/checkstyle#22153 ·
Mantenedores costumam responder em até 1 dia
-
Documentation Needs Triage
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 78/100
frankframework/frankframework#11908 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
ome/ome-codecs#48 ·
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
tonihele/OpenKeeper#672 ·
Mantenedores costumam responder em até 4 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
eclipse-ee4j/angus-mail#224 ·