redhat-developer / redhat-developer/vscode-java

JDT-LS doesn't detect Java 19 installation in standard location

Open
#3,043 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

On my machine, I have Java 19 installed in a standard location. Both CLI or Eclipse IDE do find it properly apparently. When trying to open a project defined in Eclipse IDE and that requires Java 19 (working fine in Eclipse IDE), vscode-java throws tons of errors with no assistance/quickfix to remediate those.

Environment
  • Operating System: Fedora 38
  • JDK version: Java 19
  • Visual Studio Code version: ?
  • Java extension version: 0.25.10
Steps To Reproduce
  1. On my Fedora, Java 19 is installed with usual dnf install java-openjdk-latest
  2. Generate a dummy project in Eclipse IDE targeting Java 19; play with it a bit to verify Eclipse IDE can deal with it
  3. Import the project in VSCode with Java extension

testProject.zip

Current Result

Unbound classpath container: 'JRE System Library [JavaSE-19]' in project 'sandboxJava' message and tons of unresolved types from the JRE

Expected Result

Everything fine

Additional Informations

I would expect JDT-LS to detect Java 19 from such a standard directory; and also to provide an helpful quickfix about remediation (even just linking to documentation would be better)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the attached testProject.zip and reproduce the import on Fedora 38 with Java 19 installed via dnf install java-openjdk-latest. Trace how the Java extension and JDT-LS resolve the JRE System Library [JavaSE-19] entry. Done means the project imports without unresolved JRE types, or the user receives actionable remediation guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.