The Visual Studio Code Oracle Java Platform Extension
Written by Nikos Vaggalis   
Monday, 18 December 2023

A new extension by Oracle makes the life of Java devs a little bit easier and more productive.

The battle of the IDEs is hotting up. While previously the choice of the programming language would also direct the choice of the IDE, with the advent of the Language Server Protocol, which separates the language from the editor, the lines have been blurred because any IDE can nowadays support any given language.

Java is the most catered language IDE-wise. There's Netbeans, JDeveloper, Eclipse, BlueJ, but in reality the choice is between IntelliJ and VSCode. IntelliJ is of course closely associated with Java and Kotlin, while VSCode with C# and the like. But for those devs who code in Java as well as other languages and do not want to switch IDEs depending on the language, VSCode is of course the recommended choice.

As such, Oracle with the new "Java Platform Extension" offers an even more enriched experience for those programming in Java and VSCode. Of course, it makes use of LSP to make it happen, its language server is based on the OpenJDK’s javac compiler for code editing and compilation and on OpenJDK’s debugger interface for debugging.

The important thing here is that thanks to this server edition, VSCode is able to offer IDE support for new JDK features as soon as they are introduced, even during Early Access. This means that the VS Code Extension will support the current JDK release as well as the next upcoming JDK version.

Apart from that, the extension adds many new features to the IDE too:

VS Code Command Palette options

  • New Project
  • New from Template.
  • Compile Workspace
  • Clean Workspace

Project Explorer
An addition to the classical workspace explorer. Use it to build, test, execute and operate your Maven and Gradle Java projects.

Test Explorer
A view which allows you to run all tests in a project, examine the results, go to source code and run particular test.

Debugging
Debug and run Java applications using JDK11 or newer.

Launch Configurations Panel

  • Launch Java App - Debug or Run current Java project
  • Attach to Port & Attach to Process

Run Configurations panel
Program arguments, VM options, evironment variables, etc, can be set in Run Configuration panel a part of Explorer.

Refactorings

  • Source Action ... context menu
    source actions
  • Introduce refactorings available via Show Code actions light bulb
  • More Refactorings available also using Refactor... context menu
  • Surround with refactorings
  • Class level refactorings as well as variable refactorings
  • Change method parameters refactoring is provided using dedicated form allowing to change, add, move, remove method parameters.
  • Move Members refactoring

Imports
Out of the box support for organizing imports in Java sources is available.

Javadoc
When adding JavaDoc to code the extension assists by suggesting to insert preformatted and prepopulated JavaDoc comment.

JDK detection
If the system does not detect any JDK, the extension will offer a downloader and setup prompt to help you set up a JDK.

Build system
Support for both Gradle and Maven projects.


The extension is available on the VSCode marketplace as well as on its Github repo, being open source.

In conclusion, the Oracle Java Platform Extension gives Java devs yet another reason to try out VSCode for a seamless programming experience, at the same time of challenging IntelliJ's dominance.


javaoraclelogo

More Information

Oracle Java Platform Extension for Visual Studio Code

Github repo

 

Related Articles

Microsoft Goes All Out On Java 

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Flutter Forked As Flock
05/11/2024

One of developers who worked on the Flutter team at Google has created an open-source form of the framework. Matt Carroll says Flock will be "Flutter+", will remain constantly up to date with Flutter, [ ... ]



Apache Fury Adds Optimized Serializers For Scala
31/10/2024

Apache Fury has been updated to add GraalVM native images and with optimized serializers for Scala collection. The update also reduces Scala collection serialization cost via the use of  encoding [ ... ]


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info