-
Notifications
You must be signed in to change notification settings - Fork 442
"Classpath is incomplete" warning
Whenever a java file is opened, that does not belong to a project (what we call a standalone Java file), vscode-java is unable to compute a proper classpath. It makes it useless to report compilation errors, as the UI would be filled with distracting red errors all over the file, like:
Fortunately, vscode-java is still able to provide useful content-assist for base JDK classes, report syntax errors, compute class outline or allow code navigation. So, instead, the following warning is displayed:
If you simply close the message, it will pop up next time a standalone java file will be opened. It’s possible to discard the message permanently, by clicking the Don’t Show Again
option.
Should you change your mind, it’s possible to modify that choice in VS Code’s user settings: The java.errors.incompleteClasspath.severity
key specifies the severity of the message when the classpath is incomplete for a Java file. Supported values are ignore
, info
, warning
and error
.
You need to open a folder containing a pom.xml, build.gradle or at least default eclipse setting files, so that a complete classpath and project hierarchy can be set.
Gradle-based Android projects currently show this message, as Android development is not unfortunately supported at the moment. This is a limitation of BuildShip, the project providing Gradle support.