主要参考:
需要使用到扩展:Extension Pack for java,此扩展支持的 jdk 版本:1.5及以上
官网的tips:安装了上述扩展后,可以在使用 vscode 中的命令面板(Ctrl + Shift + P),输入:java tips,即可看到 Tips for Begginers:

vscode 文档提到,对于 JAVA 支持两种模式:
关于 lightweight 模式: https://code.visualstudio.com/docs/java/java-project#_lightweight-mode
必须理解三件事:
workspace(工作区):一或多个文件目录及其子目录的集合。vscode 有两种工作区:
" Java project " 的概念是由扩展提供的,不是基于 vscode 的核心概念。因此想要在 vscode 中处理 java 项目,必须安装扩展,如:
For example, Maven, Eclipse, and Gradle Java projects are supported through Language Support for Java™ by Red Hat, by utilizing M2Eclipse, which provides Maven support, and Buildship, which provides Gradle support through the Eclipse JDT Language Server.
With Maven for Java, you can generate projects from Maven Archetypes, browse through all the Maven projects within your workspace, and execute Maven goals easily from an embedded explorer. Projects can also be created and managed with the Project Manager for Java extension.
更多关于 Java 项目在 vscode 中配置细节请看:
文档中还有一些关于测试、代码模板、代码重构、SpringBoot等框架的扩展等信息。