redhat-developer / redhat-developer/vscode-java
Maven projects not loading in VS Code after latest Language Support for Java by Red Hat Extension Update (v1.42.0)
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 547
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
After updating the Language Support for Java(TM) by Red Hat extension to version 1.42.0 (2025-05-19), my Maven Java projects no longer load properly in Visual Studio Code. The Java Language Server fails to resolve standard Java classes (e.g., java.lang.Object), and the Maven projects are not recognized or built correctly.
To Reproduce
Steps to reproduce the behavior:
- Open a multi-module Maven Java project in VS Code.
- Ensure the latest Language Support for Java(TM) by Red Hat extension (v1.42.0) is installed.
- Set the JDK in VS Code settings (settings.json) to JDK 8, 11, or 21 (tried all):
"java.jdt.ls.java.home": "valid\path\to\jdk"- Reload VS Code.
- Observe that Maven projects are not loaded, and Java standard library classes cannot be resolved.
Error Logs
- The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files
- Unbound classpath container: 'JRE System Library [java-21-openjdk]' in project ...
Environment (please complete the following information):
- OS: Windows 10/11
- VS Code version: [1.100.2]
- Language Support for Java(TM) by Red Hat extension version: 1.42.0
- JDK versions tried: 8, 11, 21 (paths set correctly in settings)
- Maven version: [3.6.0]
Additional context
- The issue started after updating to extension v1.42.0.
- The same project setup worked with previous extension versions.
- Tried cleaning workspace, deleting .classpath/.settings, and reinstalling the extension, but the issue persists.
Steps already tried
- Changed JDK versions and updated settings.json
- Set JAVA_HOME and updated PATH
- Cleaned and rebuilt Maven projects
- Reinstalled Java extensions
- Restarted VS Code and the system
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用多模块 Maven 项目、VS Code 1.100.2、扩展 1.42.0 以及 settings.json 中的 JDK 设置进行复现;从 Java Language Server 错误和项目的 .classpath/.settings 文件开始。完成的标准是 Maven 项目能够正确加载,并且 java.lang.Object 等标准类能够解析,而不出现 unbound JRE System Library。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, vscode
- 领域
- build-system, devtools
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100