{"id":14805,"date":"2017-11-10T08:00:13","date_gmt":"2017-11-10T16:00:13","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudio\/?p=14805"},"modified":"2019-02-18T09:10:09","modified_gmt":"2019-02-18T16:10:09","slug":"run-and-debug-java-9-in-visual-studio-code","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/run-and-debug-java-9-in-visual-studio-code\/","title":{"rendered":"Run and Debug Java 9 in Visual Studio Code"},"content":{"rendered":"<p>In the past 3 weeks, we\u2019ve continued to see a lot of people installing and trying our tools, reading our documents, and visiting our repository. We\u2019ve also seen a number of new issues opened by the Java community. Thank you all for trying our tools and providing feedback, all of which is motivating us to make VS Code a better tool for Java developer. With our new 0.3.0 release, we have added a few new capabilities and addressed your top feedback.<\/p>\n<h2>Java 9 Support<\/h2>\n<p>Java 9 was officially out just weeks after the initial release of our debugger. To allow more and more developers to try the new version of Java with VS Code, we\u2019ve also updated the debugger to automatically detect modular project and then resolve module path as well as main class accordingly. You can now launch your Java 9 application with breakpoint in your source file with VS Code.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/Java-9-Support.gif\"><img decoding=\"async\" title=\"Java 9 Support\" alt=\"Java 9 Support\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/Java-9-Support.gif\" \/><\/a><\/p>\n<h2>No Project? No Problem!<\/h2>\n<p>Even if you just have a single Java file which is not part of any project, now you can also run and debug it with VS Code. We believe it will come in handy when you are just learning Java or writing some quick utility tools.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/Single-File-Debug.gif\"><img decoding=\"async\" title=\"Single File Debug\" alt=\"Single File Debug\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/Single-File-Debug.gif\" \/><\/a><\/p>\n<h2>Configuring Workspace Folder and Environment Variables<\/h2>\n<p>Now you can also easily configure your workspace and set environment variables for your debuggee program easily in launch.json file.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/cwd-envVars-Support.gif\"><img decoding=\"async\" title=\"cwd envVars Support\" alt=\"cwd envVars Support\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/cwd-envVars-Support.gif\" \/><\/a><\/p>\n<p>For other changes and bug fixes, you can find more details in our <a href=\"https:\/\/github.com\/Microsoft\/vscode-java-debug\/blob\/master\/CHANGELOG.md\">changelog<\/a>.<\/p>\n<h2>Looking forward<\/h2>\n<p>As you can see from the <a href=\"https:\/\/github.com\/Microsoft\/vscode-java-debug\/issues\">issue list<\/a> from our open sourced <a href=\"https:\/\/github.com\/Microsoft\/vscode-java-debug\">GitHub repository<\/a>, we\u2019re actively working on several key new features which will be available in follow up releases. Those features include Junit test cases support, multi-root workspace support, expression evaluation as well as hot code replacing. Please don\u2019t hesitate if you would like to share your thoughts with us, just join the <a href=\"https:\/gitter.im\/Microsoft\/vscode-java-debug\">Gitter<\/a> discussion or submit an <a href=\"https:\/\/github.com\/Microsoft\/vscode-java-debug\/issues\">issue<\/a>!<\/p>\n<h3>Try it out<\/h3>\n<p>If you\u2019re trying to find a performant editor for your Java project, please give it a try<\/p>\n<ul>\n<li>Install the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-java-debug\">Java Extension Pack<\/a> or standalone <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-java-debug\">Debugger for Java<\/a> extension if you already have <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=redhat.java\">Language Support for Java(TM) by Red Hat<\/a> installed.<\/li>\n<li>Learn more about <a href=\"https:\/\/code.visualstudio.com\/docs\/languages\/java\">Java on Visual Studio Code<\/a>.<\/li>\n<li>You can submit a bug of feature request to <a href=\"https:\/\/github.com\/Microsoft\/vscode-java-debug\/issues\">Java Debugger Extension<\/a> and participant community driven <a href=\"https:\/gitter.im\/Microsoft\/vscode-java-debug\">Gitter<\/a> channel for discussion.<\/li>\n<\/ul>\n<table cellspacing=\"0\" cellpadding=\"2\" width=\"600\" border=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"150\"><img decoding=\"async\" width=\"150\" height=\"410\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/Xiaokai-He.jpg\" \/><\/td>\n<td valign=\"top\" width=\"450\"><strong>Xiaokai He<\/strong>, Program Manager, Java Tools and Services\n<a href=\"https:\/\/twitter.com\/xiaokaihe\">@XiaokaiHe<\/a><\/p>\n<p>Xiaokai is a program manager working on Java tools and services. He\u2019s currently focusing on making Visual Studio Code great for Java developers, as well as supporting Java in various of Azure services.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>In the past 3 weeks, we\u2019ve continued to see a lot of people installing and trying our tools, reading our documents, and visiting our repository. We\u2019ve also seen a number of new issues opened by the Java community. Thank you all for trying our tools and providing feedback, all of which is motivating us to [&hellip;]<\/p>\n","protected":false},"author":595,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[744,746],"tags":[742,743,745,701],"class_list":["post-14805","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","category-visual-studio","tag-extensions","tag-java","tag-visual-studio","tag-visual-studio-code"],"acf":[],"blog_post_summary":"<p>In the past 3 weeks, we\u2019ve continued to see a lot of people installing and trying our tools, reading our documents, and visiting our repository. We\u2019ve also seen a number of new issues opened by the Java community. Thank you all for trying our tools and providing feedback, all of which is motivating us to [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/14805","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/595"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=14805"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/14805\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=14805"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=14805"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=14805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}