About Upgrading to Java 11 for VS Code for Java
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 File> Preferences > 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.
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.
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.
- Learn more about Java on Visual Studio Code.
- Explore our step by step Java Tutorials on Visual Studio Code.