News

'Getting Started' with Java in Visual Studio Code Now Easier

Developers using Java tooling with Visual Studio Code now have a better "Getting Started" experience thanks to new functionality in the September Java extensions update.

Microsoft is continuing previous efforts to help developers using the most popular programming language (by many accounts) with the most popular development tool (by many accounts), recently embodied by a new installer unveiled in June.

To that end, VS Code/Java newbies can launch the revamped Getting Started experience -- featuring a quick start guide -- simply by installing the Java Extension Pack and typing in the command: Java:Getting Started.

Java Getting Started
[Click on image for larger view.] Java Getting Started (source: Microsoft).

In addition to the quick start guide, the experience includes tips for code editing and debugging and an FAQ, with more goodies on tap.

And that's not the only enhancement to Java in Visual Studio Code for rookies.

"One of the other hurdle for new Java developer is to get the JDK right," said Xiaokai He, senior program manager for Java on Visual Studio Code and Azure, in a Sept. 16 blog post. "For that, we've also upgraded our Configure Java Runtime page which now shows the JDK configuration we detect with priority order and allow you to jump to the setting by a simple click. If a working JDK configuration is not detected, this page will be presented automatically, otherwise you can also use the command Java: Configure Java Runtime to get there."

But wait, there's more for newbies: The VS Code Installer for Java (Note: clicking on link will trigger download) has also been updated, boosting the downloading and installation experience.

For more experienced developers and newcomers alike, the September update includes new refactoring and code action features (including move member and class), live linting and improvements for Debugger, Test Runner and Maven:

  • Refactoring and Code Actions: Move refactoring support -- "The Move refactoring lets you move packages and classes between the source roots of a project, class members to other classes and inner classes to upper hierarchy levels."
  • Linting and Checkstyle: "We now support Live Linting and batch check for Java through Checkstyle extension so you no longer need to save the file one by one to update the check result."
  • Debugger: "One of the changes we've recently made is to use integrated terminal as default debug console. With this change, you no longer need to make specific configuration to allow the console to accept your input. The only drawback of this change is the integrated terminal doesn't support expression evaluation. In order to use this feature, you would now need to change the console to use the Internal Console in launch.json."
  • Test Runner: "More JUnit 5 annotations are now supported by VS Code Java Test Runner."

To get started with VS Code Java development, a good place to go first are the step-by-step Java Tutorials on Visual Studio Code.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus

Featured

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube