About Upgrading to Java 11 for VS Code for Java

This post has been republished via RSS; it originally appeared at: Microsoft Developer Blogs.

Since the introduction of Java 11 requirement for running VS Code for Java, we have constantly heard from our users that they thought Java 8 is no longer supported, which is NOT true. In this blog, we will explain the requirement itself and provide steps for you to upgrade smoothly and quickly without impact your project.

Clarification of Java 11 requirement

First of all, Java 11 as minimum version of JDK is a requirement only for running VS Code for Java, and to be more specific, it’s a requirement for running the Language Server for Java extension. This is NOT a requirement to your project. That means, you can continue developing your project with version 1.5 or above. Behind scene, JDKs for your project and for running VS Code for Java are specified by configurations of java.configuration.runtimes and java.home respectively. Our JDK for Projects document provides more details.

How to upgrade

For a smooth and quick upgrade to Java 11 for running VS Code for Java, here are steps we suggest you follow: 1. Download and install a Java 11 JDK, if haven’t. 2. Open VS Code and open FilePreferences > Settings menu. A Settings view will be launched in your editor window. 3. In Settings view, search for configuration “java.home”, set its value to the root of your JDK 11’s installation path, and save. Image java 11 8211 jave home Image java 11 8211 java home setting 4. In Settings view, search for configuration “configuration.runtimes”, specify JDK(s) for your project, and save. This is the configuration determining your project’s JDK. For details of how to configure, please refer to JDK for Projects document.Image java 11 8211 runtime configuration setting 5. Restart VS Code, and now you are set to go. Hope the information we are providing in this blog can help you smoothly and quickly upgrade to Java 11 for running VS Code for Java, while you can continue working with a different version of JDK for your project. Please let us know if you have any questions or feedback. We would love to hear from you.

Try it out

Please don’t hesitate to give it a try! Your feedback and suggestions are very important to us and will help shape our product in future.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.