java.lang.NoClassDefFoundError: java/applet/Applet on modern JDKs (Java 26+) due to legacy Applet references
还没有人认领这个 Issue。
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Java
- 星标
- 121
- 派生
- 52
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
assertj/assertj-swing 的其他 Issue
-
难度 5/5 一周以上 新手友好度 25/100
assertj/assertj-swing#279 ·
-
难度 2/5 1-3 小时 新手友好度 48/100
assertj/assertj-swing#278 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 30/100
assertj/assertj-swing#276 · 1 条评论 ·
-
Update unit test to avoid deprecated `ExpectedException.none()` by using `Assert.assertThrows()`未关闭
难度 4/5 3-5 天 新手友好度 35/100
assertj/assertj-swing#275 ·
-
难度 3/5 1-2 天 新手友好度 35/100
assertj/assertj-swing#277 · 1 条评论 ·
查看 assertj/assertj-swing 的全部 Issue
相似的 Issue
-
`Processing lsp` never exits and leaves orphaned processes可能已有人在做 @overcast302 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 72/100
processing/processing4#1578 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 60/100
维护者通常 1 天内回复
-
[BUG] S3 CORS responses omit Access-Control-Allow-Credentials for matched origins可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
securityHeaders replaces a route's own Content-Security-Policy (0.9.9; weakens embedders' pages)未关闭bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
sqlcipher/sqlcipher-android#97 · 1 条评论 ·