About Upgrading to Java 11 for VS Code for Java

Yaojin Yang

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 Configure JDK 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 “java.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.

4 comments

Discussion is closed. Login to edit/delete existing comments.

  • Manoj Patil 0

    very interesting, good job and thanks for sharing such a good blog.

    https://www.careermanthra.in

  • Ander Da Rosa 0

    I’ve returned to VsCode after reading this post. Thanx.

    • anonymous 0

      this comment has been deleted.

  • Jack Acton 0

    This works but the documentation makes it really confusing and doesn’t explain this well.

Feedback usabilla icon