JAR file(s) can be added by clicking the + sign next to Referenced Libraries node in project view.įor more details on library, refer to Library Configuration. Add a dependencyįor Maven project, you can add a dependency by clicking the + sign next to Maven Dependencies node in project view. As a tip, you can run the command Java: Import Java projects in workspace to reimport a project and alert the language server that there were changes to the project, without reloading your window.
VS Code for Java will detect your project type automatically. During creation, VS Code will facilitate installing required extension(s) per your project type, if the extension(s) weren't installed.Ī project or module is imported to a workspace through File > Open Folder or File > Open Workspace menu. You can create a project or source only workload by clicking the + sign on project view, or through the command: Java: Create Java Project. You can switch between a hierarchy view and flat view. Project view helps you view your project and its dependencies, and provides entry points for project management tasks.
The Project Manager for Java extension is included in the Extension Pack for Java, which also has other tools for Java development in VS Code.įor details on how to get started with the extension pack, please see Getting Started. The extension helps manage class paths and dependencies, and create new projects, packages, and classes. Managing a project in VS Code requires the Project Manager for Java extension.
If you run into any problems when using the features below, you can contact us by entering an issue. This document will give you an overview of how to manage your Java project in Visual Studio Code. Configure IntelliSense for cross-compiling.