To help Java developers set up on VS Code, Microsoft offers a Java Extension Pack, which contains Red Hat's Language Support for Java extension, a Debugger for Java, Java Test Runner, Maven for Java, Java Dependence View, and Microsoft's AI-powered auto-complete tool, Visual Studio IntelliCode.
The latest set of updates help developers immediately see what Java language level they're using on VS Code's status bar, so they no longer need to open a project file to find it.
Clicking the language level on the editor's status bar takes the user to the 'java.configuration.runtimes' setting, where they can configure the Java SE Development Kit (JDK). The enhancement requires the latest version of Red Hat's Language Support for Java extension and the active editor tab set to a .java file.
The update builds on Microsoft's Java on VS Code updates from March, which weeded out unhelpful warnings and introduced support for the the SonarLint extension that helps Java developers detect code quality and security issues on the fly.
VS Code now offers developers an option to automatically refactor packages when renaming a folder. Users will see a prompt the first time they use it that asks them to confirm whether to always automatically refactor packages or always preview before applying it.
And the Java Debugger extension now allows users to attach the debugger by process ID, which again requires the latest version of the extension and also requires users to configure it with the 'java: Attach to Process' option.
Other notable improvements include a Command 'Create Java Project' that lets users choose to create a Java project with Maven support if the Maven extension is installed, or a project without any build tools.
There's also a new command of 'Import Java projects in workspace' that can be used to add a module into an opened project without restarting the window.