redhat-developer / redhat-developer/vscode-java

"Classpath is incomplete" warning with Maven project

Open
#654 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I get the "Classpath is incomplete" popup warning, but can't seem to figure out the magic combination of rain dances required to make it "work".

Environment
  • Operating System: Mac OS 10.13.6
  • JDK version: 1.8.0_144
  • Visual Studio Code version: 1.27.2
  • Java extension version: 0.3.0
Steps To Reproduce
  1. Create a blank maven project in an empty folder using the context menu "Generate from Maven Archetype"
  2. Open the generated App.java

Sample project attached
threadtest.zip

The only relevant log entry in server log is:

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-09-27 11:53:20.416
!MESSAGE Classpath is incomplete. Only syntax errors will be reported for file:///<REDACTED>/threadtest/src/main/java/threadtest/App.java
Current Result

VS Code pops up the "Classpath is incomplete" warning

Expected Result

Based on the suggestions here, I expected to not get this warning. It's worth noting however, that the language on this page is a little confusing. Particularly this:

Whenever a java file is opened, that does not belong to a project

VS Code doesn't have a concept of a "project". Are you talking about a Maven project? Folks new to either VS Code or your extension (like me) might be confused by what this means (in-fact I am still confused, because I think I have a project but presumably I don't)

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 threadtest.zip and generated App.java, then compare the server log entry with the linked “Classpath is incomplete” warning guidance. Reproduce the warning using the listed VS Code, Java extension, JDK, and macOS versions if available; done means the blank Maven project opens without the popup.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
build-system, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.