News

Back-to-School Edition of Java on VS Code Courts Educators, Students

In a seasonal twist, Microsoft's dev team for Java on Visual Studio Code introduced a special education edition in the February 2022 update, courting educators and students with new functionality as classes resume after a winter break.

"Many schools are back in session after the winter holidays, and in order to provide student and educators a better experience using Java on Visual Studio Code this semester, we have been making a series of improvements regarding unit testing, GUI application development and Gradle project creation," said Nick Zhu, senior program manager, in a Feb. 10 blog post.

For unit testing, the team addressed student feedback about the need to manually add testing framework JARs (a package file format like ZIP) to a simple Java project, getting no help from the dev team's extensions. "To address this, we have added a new feature in our extensions so that if your project (assuming it is a basic project without build tools) does not contain any testing related libraries, you can easily add the JAR and enable unit testing in your project," Zhu said.

That's done via the Extension Pack for Java, which provides a new Enable Java Tests button in the Testing view that downloads specific testing-related JARs and then adds them to the libraries folder, shown below in animated action:

Enabling Tests in Animated Action
[Click on image for larger, animated GIF view.] Enabling Tests in Animated Action (source: Microsoft).

GUI application development, meanwhile, is boosted by improvements to the most popular GUI frameworks: JavaFX, Swing and Abstract Window Toolkit (AWT).

"GUI-based Java applications are quite common in school projects," said Zhu, who detailed:

  • JavaFX: New support for creating a JavaFX-based project with a Maven archetype (kind of like a template), along with providing more Visual Studio Code sample projects for JavaFX. "We also realize students might be working on JavaFX projects using other build tools (Gradle) or no build tools at all, therefore we have provided complete JavaFX samples for all those different cases," Zhu said.
  • AWT: Developers can now enable code-completion functionality for AWT types, which are necessarily hidden by default and thus not subject to code completion. "To enable the code completion for AWT, you can open the Command Palette (Ctrl+Shift+P) and then select the command Java: Help Center," Zhu explained. "Go to the Student section and select Enable AWT Development. Please note that this action will update a setting at the workspace level, so please make sure a workspace is opened in Visual Studio Code."
  • Swing: "Swing application development is supported in the Extension Pack for Java by default," Zhu said. "You can directly develop any Swing application without additional setup. To find more Swing examples, you can visit the official Oracle documentation."

Another GUI-related improvement is a new dedicated article ("Develop AWT applications") for Java GUI application development now included in the VS Code documentation.

The team also added support for Gradle project creation in the Java project creation workflow, which comes in the Gradle for Java extension included in the aforementioned Extension Pack for Java. That extension pack -- still in preview -- has now been installed more than 11.3 million times.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Mastering Blazor Authentication and Authorization

    At the Visual Studio Live! @ Microsoft HQ developer conference set for August, Rockford Lhotka will explain the ins and outs of authentication across Blazor Server, WebAssembly, and .NET MAUI Hybrid apps, and show how to use identity and claims to customize application behavior through fine-grained authorization.

  • Linear Support Vector Regression from Scratch Using C# with Evolutionary Training

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the linear support vector regression (linear SVR) technique, where the goal is to predict a single numeric value. A linear SVR model uses an unusual error/loss function and cannot be trained using standard simple techniques, and so evolutionary optimization training is used.

  • Low-Code Report Says AI Will Enhance, Not Replace DIY Dev Tools

    Along with replacing software developers and possibly killing humanity, advanced AI is seen by many as a death knell for the do-it-yourself, low-code/no-code tooling industry, but a new report belies that notion.

  • Vibe Coding with Latest Visual Studio Preview

    Microsoft's latest Visual Studio preview facilitates "vibe coding," where developers mainly use GitHub Copilot AI to do all the programming in accordance with spoken or typed instructions.

  • Steve Sanderson Previews AI App Dev: Small Models, Agents and a Blazor Voice Assistant

    Blazor creator Steve Sanderson presented a keynote at the recent NDC London 2025 conference where he previewed the future of .NET application development with smaller AI models and autonomous agents, along with showcasing a new Blazor voice assistant project demonstrating cutting-edge functionality.

Subscribe on YouTube