{"id":230894,"date":"2024-04-23T01:19:55","date_gmt":"2024-04-23T08:19:55","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/java\/?p=230894"},"modified":"2024-04-23T01:19:55","modified_gmt":"2024-04-23T08:19:55","slug":"java-on-visual-studio-code-update-april-2024","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/java\/java-on-visual-studio-code-update-april-2024\/","title":{"rendered":"Java on Visual Studio Code Update &#8211; April 2024 (Roadmap Update)"},"content":{"rendered":"<p>Hi everyone, welcome to the April update for Visual Studio Code for Java! In this blog we are going to share our roadmap for the next few months, and also recent product updates such as JDK 22 support and redesigned Project Settings experience, so let&#8217;s get started!<\/p>\n<h3>Roadmap for the next 6 months<\/h3>\n<p>We are excited to share our roadmap for the next six months! This roadmap is based on a lot of feedback from our users so we want to thank the community for providing all the input. <span class=\"EOP SCXW155931332 BCX0\" data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559739&quot;:160,&quot;335559740&quot;:279}\">We will continue to work with our partner Red Hat to deliver the best experience for Java developers on Visual Studio Code. Here are the main areas on our roadmap.\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2024\/04\/roadmap.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-230895\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2024\/04\/roadmap.png\" alt=\"2024 04 roadmap\" width=\"969\" height=\"544\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2024\/04\/roadmap.png 969w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2024\/04\/roadmap-300x168.png 300w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2024\/04\/roadmap-768x431.png 768w\" sizes=\"(max-width: 969px) 100vw, 969px\" \/><\/a><\/p>\n<p><strong>Fundamental Experience<\/strong><\/p>\n<p>Supporting the latest JDK is always our priority. We will also add some advanced code navigation and debugging capabilities as this impacts developer&#8217;s daily workflow. Lastly, we will integrate the <strong>javac<\/strong> compiler as alternative to our current ECJ compiler.<\/p>\n<p><strong>Performance and Reliability<\/strong><\/p>\n<p>Performance and reliability is our next top priority as we have heard a lot of feedback in this area. We will focus on reducing the number of unreliable sessions and optimizing the memory \/ CPU usage per session.<\/p>\n<p><strong>Compatibility<\/strong><\/p>\n<p>When we released the <a href=\"https:\/\/devblogs.microsoft.com\/java\/new-build-server-for-gradle\/\">Build Server for Gradle<\/a> last year, we received a lot of positive feedback from the community. In the next few months we are going to integrate Gradle for Java extension (which is built on Build Server for Gradle) into our Extension Pack for Java and at the same time, focusing on increasing the project import success rate for Gradle projects.<\/p>\n<p><strong>Project Management<\/strong><\/p>\n<p>A lot of Java developers come from traditional Java IDE background and mentioned they want to have see better JDK configuration experience so we are going to improve this area. In addition, we will have better project creation \/ import experience and package creation workflow as well.<\/p>\n<p><strong>User Experience<\/strong><\/p>\n<p>For user experience, we will mainly add more code refactoring and action options for developers, and also make them easier to discover. We will also make our Java language server settings more organized and discoverable.<\/p>\n<p><strong>AI<\/strong><\/p>\n<p>In terms of AI, our extensions will integrate with GitHub Copilot Chat (which now has <a href=\"https:\/\/code.visualstudio.com\/blogs\/2023\/11\/13\/vscode-copilot-smarter#_extensibility\">extensibility<\/a>) so that Java developers can leverage this integration to make their coding scenarios even more efficient. Please stay tuned.<\/p>\n<h3><strong>Product Update<\/strong><\/h3>\n<h4>Java 22 Support<\/h4>\n<p>You can already use JDK 22 in Visual Studio Code. All language features are now supported and here&#8217;s a few features to highlight:<\/p>\n<p><strong><span class=\"copy-title\">String templates (Second Preview)<\/span><\/strong><\/p>\n<p>This feature was previewed in JDK 21 and now in second preview. The main purpose is to offer a much better alternative option to all the String concatenation code in our programs. You can view the details of this feature <a href=\"https:\/\/openjdk.org\/jeps\/459\">on this link<\/a>. Here&#8217;s a demo of this feature.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2024\/04\/strtemplate.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-230898\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2024\/04\/strtemplate.gif\" alt=\"String template\" width=\"1438\" height=\"984\" \/><\/a><\/p>\n<p id=\"implicitly-declared-classes-and-instance-main-methods-preview-language-feature\"><strong><span class=\"copy-title\">Implicitly Declared Classes and Instance Main Methods (Second Preview)<\/span><\/strong><\/p>\n<p>This <a href=\"https:\/\/openjdk.org\/jeps\/463\">preview feature<\/a> (which was also previewed in JDK 21) is mostly targeted for Java students and learners, now they don&#8217;t have to explicitly declare a class and or type <strong><span style=\"font-family: 'courier new', courier, monospace;\">public static void main(String[] args)<\/span><\/strong>, and classes or main methods can be implicitly declared. Check the demo below.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2024\/04\/unnamed-class.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-230899\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2024\/04\/unnamed-class.gif\" alt=\"Unnamed class\" width=\"1438\" height=\"984\" \/><\/a><\/p>\n<p>These are just a few of the Java 22 features. For complete list of the features, please check the <a href=\"https:\/\/openjdk.org\/projects\/jdk\/22\/\">reference documentation<\/a>.<\/p>\n<p>Please note that if you are going to use preview features of Java 22, be sure to check <a href=\"https:\/\/github.com\/redhat-developer\/vscode-java\/wiki\/Enabling-Java-preview-features\">this doc<\/a> and see how to enable preview features.<\/p>\n<h4>Improved Project Setting Experience<\/h4>\n<p>We have heard a lot of feedback on our Java runtime as well as Java classpath configuration experience in the past several months. In our latest version, we have rolled out a redesigned experience that has a simplified layout. To access it, you can bring up the command palette, and type &#8220;<strong>&gt;Java: Configure Classpath<\/strong>&#8221;<\/p>\n<p>The new layout has three tabs, Sources, JDK Runtime, and Libraries.<\/p>\n<p><strong>Sources<\/strong> &#8211; Allows you to configure the source root folders of your project<\/p>\n<p><strong>JDK Runtime<\/strong> &#8211; Allows you to configure the Java runtime for your project<\/p>\n<p><strong>Libraries<\/strong> &#8211; Allows you to configure referenced libraries of your code.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2024\/04\/projectsettings.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-230901\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2024\/04\/projectsettings.png\" alt=\"Project Setting\" width=\"1021\" height=\"761\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2024\/04\/projectsettings.png 1021w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2024\/04\/projectsettings-300x224.png 300w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2024\/04\/projectsettings-768x572.png 768w\" sizes=\"(max-width: 1021px) 100vw, 1021px\" \/><\/a><\/p>\n<p>For each tab, you can perform different operations. Here&#8217;s the demo of key scenarios for each tab.<\/p>\n<p><strong>Adding source folder<\/strong><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2024\/04\/addsource.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-230902\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2024\/04\/addsource.gif\" alt=\"Adding source folder\" width=\"1548\" height=\"766\" \/><\/a><\/p>\n<p><strong>Configuring JDK Runtime<\/strong><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2024\/04\/configurejdk.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-230904\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2024\/04\/configurejdk.gif\" alt=\"Configure JDK\" width=\"1438\" height=\"984\" \/><\/a><\/p>\n<p><strong>Adding an external library<\/strong><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2024\/04\/configurelibraries.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-230905\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2024\/04\/configurelibraries.gif\" alt=\"Configure libraries\" width=\"1670\" height=\"998\" \/><\/a><\/p>\n<p>After you perform all the operations, please be sure to click &#8220;<strong>Apply Settings<\/strong>&#8221; at the bottom.<\/p>\n<p>We hope this simplified layout of &#8220;Project Settings&#8221; can bring better experience when you are configuring different key components of your project.<\/p>\n<h3><strong>Install Extension Pack for Java<\/strong><\/h3>\n<p>To use all features mentioned above, please download and install <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-java-pack\">Extension Pack for Java<\/a> on Visual Studio Code.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/09\/javapack.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-229421\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/09\/javapack.png\" alt=\"Extension pack for Java\" width=\"1215\" height=\"238\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/09\/javapack.png 1215w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/09\/javapack-300x59.png 300w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/09\/javapack-1024x201.png 1024w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/09\/javapack-768x150.png 768w\" sizes=\"(max-width: 1215px) 100vw, 1215px\" \/><\/a><\/p>\n<p>If you are a Spring developer working on a Spring Boot application, you can also download the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=Pivotal.vscode-boot-dev-pack\">Spring Boot Extension Pack<\/a> for specialized Spring experience.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/10\/spring.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-229533\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/10\/spring.png\" alt=\"Spring boot extension pack\" width=\"1221\" height=\"224\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/10\/spring.png 1221w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/10\/spring-300x55.png 300w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/10\/spring-1024x188.png 1024w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2022\/10\/spring-768x141.png 768w\" sizes=\"(max-width: 1221px) 100vw, 1221px\" \/><\/a><\/p>\n<h3><span style=\"font-size: 18pt;\"><strong><span class=\"x-hidden-focus\">Feedback and suggestions<\/span><\/strong><\/span><\/h3>\n<p>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<\/p>\n<ul>\n<li>Leave your comment on this blog post<\/li>\n<li><a href=\"https:\/\/github.com\/microsoft\/vscode-java-pack\/issues\/new\/choose\" target=\"_blank\" rel=\"noopener\">Open an issue<\/a>\u00a0on our GitHub Issues page<\/li>\n<li>Send an email to: vscjfeedback@microsoft.com<\/li>\n<\/ul>\n<h3 id=\"try-it-out\" class=\"x-hidden-focus\"><span style=\"font-size: 18pt;\"><strong><span class=\"x-hidden-focus\">Resources<\/span><\/strong><\/span><\/h3>\n<p>Here is a list of links that are helpful to learn Java on Visual Studio Code.<\/p>\n<ul>\n<li class=\"x-hidden-focus\">Learn more about\u00a0<a class=\"x-hidden-focus\" href=\"https:\/\/code.visualstudio.com\/docs\/languages\/java\" target=\"_blank\" rel=\"noopener noreferrer\">Java on Visual Studio Code<\/a>.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi everyone, welcome to the April update for Visual Studio Code for Java! In this blog we are going to share our roadmap for the next few months, and also recent product updates such as JDK 22 support and redesigned Project Settings experience, so let&#8217;s get started! Roadmap for the next 6 months We are [&hellip;]<\/p>\n","protected":false},"author":31999,"featured_media":230919,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[14,22,1,8,15],"tags":[],"class_list":["post-230894","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud","category-desktop","category-java","category-open-source","category-vscode"],"acf":[],"blog_post_summary":"<p>Hi everyone, welcome to the April update for Visual Studio Code for Java! In this blog we are going to share our roadmap for the next few months, and also recent product updates such as JDK 22 support and redesigned Project Settings experience, so let&#8217;s get started! Roadmap for the next 6 months We are [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts\/230894","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/users\/31999"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/comments?post=230894"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts\/230894\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/media\/230919"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/media?parent=230894"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/categories?post=230894"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/tags?post=230894"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}