Test build failure
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- java, vscode
- Domain
- build-system, devtools, testing
Research direction
Start with the build.gradle Java compatibility settings and compare the Gradle sidebar build with the Test runner invocation in the reported remote-SSH setup. Check the configured Java runtime and determine why the test path cannot resolve javax.xml.bind; done means reproducing the mismatch and identifying a documented or verified fix.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- TypeScript
- Stars
- 591
- Forks
- 429
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 19
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode-java-debug
-
ai-triaged enhancement
Difficulty 3/5 1-2 days Newbie friendliness 55/100
microsoft/vscode-java-debug#1689 · 2 comments ·
-
ai-triaged bug
microsoft/vscode-java-debug#1666 · 1 comment · 1 assignee ·
-
ai-triaged bug
Difficulty 3/5 1-2 days Newbie friendliness 48/100
microsoft/vscode-java-debug#1658 · 1 comment ·
-
ai-triaged enhancement
Difficulty 4/5 3-5 days Newbie friendliness 45/100
microsoft/vscode-java-debug#1628 · 3 comments ·
-
Feature support. Openai-triaged enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
microsoft/vscode-java-debug#1616 · 1 comment ·
All issues in microsoft/vscode-java-debug
Similar issues
-
clawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
ZCode 3.14.3 に対応する Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
supermomonga/zcode-acp#24 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
growthbook/growthbook#7100 ·
-
triage
Difficulty 1/5 1-3 hours Newbie friendliness 88/100