vs代码不支持JDK 1.8?

vs代码不支持JDK 1.8?

问题描述:

VS Code(代码运行器扩展)是否支持 JDK 1.8?早上我正在使用 JDK 12 ,但后来我降级到 JDK 1.8 以试用小程序查看器和其他东西.不幸的是,现在它甚至没有突出显示代码.

Does VS Code (code-runner extension) support JDK 1.8? In the morning I was using JDK 12 , but then I downgraded to JDK 1.8 to try out applet viewer and stuff. Unfortunately now it doesn't even highlight the code.

请有人告诉我问题及其解决方案.

Someone please tell me the problem and its solution.

VSCode 支持 JDK 1.8.

JDK 1.8 is supported by VSCode.

阅读https://code.visualstudio.com/docs/languages/java 并安装所需的扩展程序.

Read https://code.visualstudio.com/docs/languages/java and install needed extensions.

2021 年更新

目前在 VSCode 中使用 Java 扩展需要其所需的 JDK 11,但您仍然可以在项目中使用旧版本的 JDK.请参阅this 以获取有关如何配置其他 JDK 版本的信息为您的项目.

Currently to use the Java extension in VSCode its required JDK 11, but you can still use older versions of JDK in your projects. See this to get information about how to configure other JDK version for your project.