File xxx is non-project file, only syntax errors are reported
, which means you are in Lightweight Mode. If you want to see all the type errors and get full support, right-click on this warning and switch out of Lightweight Mode through the context menu. See the screenshots below.java.server.launchMode
, below are the accepted values:Hybrid
(default) - Provides full features with better responsiveness. It starts a standard language server and a secondary syntax server. The syntax server provides syntax features until the standard server is ready. The syntax server will be shutdown automatically after the standard server up and running.Standard
- Provides full features such as IntelliSense, refactoring, building, Maven/Gradle support etc. With this option, you will wait until the full server is up for all features.LightWeight
- Starts a syntax server with lower start-up cost. Only provides syntax features such as outline, navigation, Javadoc, syntax errors. The lightweight mode won't load third party extensions, such as Java test runner, Java debugger, etc. This mode consumes the least resources but won't provide key features such as IntelliSense.lib/
folder in the root directory of the standalone files and place your JAR files there. Source for foo.jar
is automatically detected if there is a foo-sources.jar
in the lib/
folder.java.project.referencedLibaries
in settings.json
. Below are details on how to customize this setting..jar
files in workspace's library folder along with foo.jar
from a specified absolute path to the project's external dependencies.lib
directory using the glob pattern lib/**/*.jar
.java.project.referencedLibraries
to use include/exclude
fields and add an exclude
glob pattern:library/sources
folder are ignored as the project's external dependencies.{binary}.jar
will try to search {binary}-sources.jar
under the same directory, and attach it as source if one match is found.sources
field:bar-src.jar
is attached to bar.jar as its source..classpath
file with the path to the JAR file:java.configuration.runtimes
array for Java execution environments. VS Code will detect the runtime required for your project and choose the appropriate one configured.