Recently, Oracle has lifted the veil on its new Oracle Java Platform extension for Microsoft's Visual Studio Code. This noteworthy release brings a comprehensive toolkit for Java development to the lauded code editor, allowing easier creation, execution, and testing of Java applications for Maven and Gradle projects.
This extension is available via the VS Code platform, which is a part of Visual Studio Marketplace. Oracle first announced this extension on October 18, promising to cater to the full development cycle, which encompasses everything from modification and compilation to troubleshooting and testing. Class-level and variable refactoring capabilities also come as part of its offerings.
In the initial release of the Oracle Java Platform extension, several features are included such as a project view, error highlighting, auto-completion, and jump-to-definition capabilities. To supplement testing, there is also support for Junit unit testing.
Oracle observed and indicated that the shifting popularity of Visual Studio Code as a universal Integrated Development Environment (IDE) has caused a paradigm shift in the interplay between programming languages and IDEs. Traditionally, developers first opted for a language and followed with an IDE selection; today, the expectation is that language-agnostic IDEs like VS Code will provide robust support for all languages that developers utilize. Many Java developers, particularly students and those proficient in multiple languages, have started to adopt VS Code.
The mechanism underlying the VS Code extension's ability to support a programming language is the language server at its core, as noted by Oracle. This back-end element handles the language tools and interacts with the IDE using the Language Server Protocol. Oracle has developed a concise version of the Java language server, the original version of which was conceptualized for the Apache NetBeans project.
Oracle's language server draws upon the OpenJDK javac compiler for code edition and compilation. As a result, VS Code can promptly offer support for new JDK (Java Development Kit) features as soon as they are rolled out. This extension by Oracle pledges to back the current JDK releases besides the soon-to-be-launched JDK version, with the latest version being JDK 21, launched in September.
Interestingly, Microsoft has its suite of Java development tools for VS Code, inclusive of an Extension Pack for Java. The pack contains an assortment of extensions intended for scripting, evaluating, and rectifying Java applications. While many alternatives exist like AppMaster for low-code and no-code development, such extensions advance the scope of Java development by making it more accessible across numerous platforms.