September 13th, 2024

Java on Visual Studio Code Update – August 2024

Nick Zhu
Senior Program Manager

Hi everyone, welcome to the August update for Visual Studio Code for Java! In this blog, we will cover important Gradle updates, more user experience improvements, and an improved getting started experience, let’s get started!

Gradle Updates

Adding Gradle for Java into Extension Pack for Java

Some of our users might have noticed that recently in Extension Pack for Java, an extension called “Gradle for Java” was added into this pack. Here we want to offer some background behind this change

Gradle for Java extension is an extension that’s dedicated to offer Gradle support on Visual Studio Code. We have been adding features into this extension for a while now including the Build Server for Gradle. However, because it is a standalone extension, many Gradle / Java developers have trouble discovering it. Therefore, we have been collecting feedback for the extension and finally decided to add it to the Extension Pack for Java in the recent release.

However, before we add it into the pack, we found that the architecture of the extension needs some improvements. In specific, the extension will launch multiple JVM process to provided different features, which uses way too much computation resources. Therefore, we decided to make some optimizations – in short, we merged those different JVM process into one, thus lowed the number of JVM processes and significantly reduced the memory consumption when using the extension. Here are the memory consumption comparison when using different sizes of projects.

Small project

Small project

Medium project

Medium project

Large project

Image Large

We hope you like the Gradle features we offer in the extension and if there’s any issues, don’t hesitate to let us know by opening an issue!

Delegate “Debug Test” to Gradle

In our previous blog, we mentioned supporting delegating test to Gradle for “Run Test” scenario in our extension, which allows you to execute tests in Visual Studio Code Java via the Gradle test runner, this will ensure consistency of the test output with Gradle CLI. In our latest release, we have also enabled “Debug Test” as well. Here’s a demo for this feature.

Debug test

Updated Walkthrough

In Visual Studio Code, walkthroughs provide a unique experience for onboarding users to an extension via a multi-step checklist. Recently, we have made some updates to the walkthrough for our Extension Pack for Java. Users can now learn how to access code actions and source actions among these steps. Here’s a screenshot.

Improved Walkthrough

User experience improvements

Source Actions via Quick Fix (lightbulb)

In addition to making source action more aware to the users in the walkthrough, we have also made it more accessible from the Quick Fix as well. Users can now directly trigger source actions from the Quick Fix lightbulb in the editor area. We hope these changes can provide convenience to the developers whenever they need to make quick changes to the code.

Image sourceaction

Install Extension Pack for Java

To use all features mentioned above, please download and install Extension Pack for Java on Visual Studio Code.

Extension pack for Java

If you are a Spring developer working on a Spring Boot application, you can also download the Spring Boot Extension Pack for specialized Spring experience.

Spring boot extension pack

Feedback and suggestions

As always, your feedback and suggestions are very important to us and will help shape our product in future. There are several ways to give us feedback

  • Leave your comment on this blog post
  • Open an issue on our GitHub Issues page
  • Send an email to: vscjfeedback@microsoft.com

Resources

Here is a list of links that are helpful to learn Java on Visual Studio Code.

Author

Nick Zhu
Senior Program Manager

Developer at heart

1 comment