microsoft / microsoft/vscode-java-debug
Test build failure
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 591
- 派生
- 429
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 19
描述
Hello
I have a java project with gradle build.
I want to build with Java 8. My code used packages removed in java 11, for example javax.xml.bind.JAXBContext
So , in my build.gradle, I have
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
And I can run gradle tasks build/check/test using the vscode gradle side bar item without issues.
But when I try to launch a test using Test runner, the gradle build fails with "error: package javax.xml.bind does not exist"
So it seems to build with Java 11!
So why? Does test runner uses another gradle version (where java sourceCompatibility/targetCompatibility is not supported)?
Does a workaround exists?
I checked also Command -> Configure java runtime , and I have Java 1.8 configured too.
Environment
- Operating System: VScode is running on Windows 10 with a remote-ssh to a Linux workstation
- JDK version: 1.8
- Visual Studio Code version: 1.85.2
- Java extension version: 0.25.15
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 build.gradle 中的 Java 兼容性设置开始,并比较报告的 remote-SSH 设置中的 Gradle 侧边栏构建与 Test runner 调用。检查配置的 Java 运行时,并确定测试路径无法解析 javax.xml.bind 的原因;完成标准是重现该不匹配并确定一个有文档记录或经过验证的修复方法。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, vscode
- 领域
- build-system, devtools, testing
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100