Java on VS Code February update adds new features for dependency management

Share
  • February 21, 2020

The February update for Java development in VS Code has arrived, one of several extensions for Java development in Microsoft’s source code editor. Let’s see what has been added in the second update of the year.

SEE ALSO: VS Code 1.42: Jan 2020 update includes Rename preview & debugger improvements

What’s new for Java on VS Code

Java Dependency Viewer now provides new options for dealing with dependencies.

For example, you can add dependency for a Maven project via the + button in the Java dependency explorer, as Microsoft demonstrates in a gif. Projects that don’t use Maven or Gradle work in a similar way when referencing binary jars in a local file system.

The new preference mapping java.configuration.runtimes for Java execution environments has been added as well. This feature is aimed at developers who use multiple Java runtimes. It detects and selects the appropriate runtime required for the project.

This is how to use the new preference mapping:

"java.configuration.runtimes": [
{
"name": "JavaSE-1.8",
"path": "/usr/local/jdk1.8.0_201"
},
{
"name": "JavaSE-11",
"path": "/usr/local/jdk-11.0.3",
"sources" : "/usr/local/jdk-11.0.3/lib/src.zip",
"javadoc" : "https://docs.oracle.com/en/java/javase/11/docs/api",
"default": true
},
{
"name": "JavaSE-12",
"path": "/usr/local/jdk-12.0.2"
},
{
"name": "JavaSE-13",
"path": "/usr/local/jdk-13"
}
]

Further updates include the added java.import.gradle.offline.enabled preference, Collapse All support in the Java Dependency Viewer, and the removal of the final modifier.

Other updated Java extensions

Not only has Java on VS Code received an update, but several popular Java extension have been upgraded as well. For example, Spring Boot Tools can now report connection failures in the live hover and the preview of the new MicroProfile Extension Pack includes MicroProfile Starter, also still in preview mode, which allows you to create MicroProfile Maven projects.

SEE ALSO: VS Code 1.42: Jan 2020 update includes Rename preview & debugger improvements

See more about the latest VS Code for Java updates in the February update.

The post Java on VS Code February update adds new features for dependency management appeared first on JAXenter.

Source : JAXenter