redhat-developer / redhat-developer/vscode-java

'Cannot be resolved' errors in projects with module-info.java

Open
#881 28 comments 5 reactions 1 assignee View on GitHub

@snjeza is already working on this.

Since Aug 30, 2019.

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

Description

I am not able to get projects that use a module-info.java file to work with VS Code and Java. I've tried both Gradle and Maven.

VS Code p shows me a bunch of "cannot be resolved" errors for any classes called out in the module-info.java file. What I have found is that if I put a module attribute in the classpath, then it will work. However, because I am modifying the classpath file manually, I find that Gradle and Maven will automatically refresh the classpath file and remove my modifications to it, which will bring back the errors.

Is there a proper way to use modules with VS Code and Java? It seems that the problem is due to the fact that there needs to be module path information set in the classpath file in order for Eclipse to be happy, but there is no good way to do with that from Gradle or Maven.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.