redhat-developer / redhat-developer/vscode-java

VSCode Java doesn't handle .classpath files properly

Open
#606 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Environment
  • Operating System: Windows
  • JDK version: 1.8.0_171
  • Visual Studio Code version: 1.25.1
  • Java extension version: 0.29.0
Steps To Reproduce
  1. Copy, write, or otherwise create an Eclipse-style .classpath file, specifying a src directory.
  2. Create an empty foo.java file in that directory
Current Result

Popup: foo.java isn't on the classpath.

Expected Result

No popup, working go-to-definition and similar project handling.

Additional Information

It is not entirely clear from the website that 'More information' leads to what precisely needs to be copied for the vscode-java to properly build the classpath, so if the answer turns out to be "you need more than just the .classpath", the issue just changes to "the documentation on 'Classpath is incomplete' does not provide sufficient information to actually resolve the issue."

(Also, note that the error is different from that one given when there is no classpath present. vscode-java clearly sees that there's a file there, but isn't reading it correctly.)

bugrepro.zip

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 bugrepro.zip and reproduce the behavior using the Eclipse-style .classpath file, a src directory, and empty foo.java. Inspect how the VSCode Java extension handles the .classpath and the “Classpath is incomplete” information; done means the popup no longer appears and go-to-definition works for the project.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript
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.