user11555625
user11555625

Reputation:

JDK 1.8 not supported by vs code?

enter image description here

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.

Upvotes: 3

Views: 13309

Answers (5)

Gabriel C
Gabriel C

Reputation: 1220

The current documentation says it does support JDK 1.8. See: https://code.visualstudio.com/docs/languages/java#_install-a-java-development-kit-jdk

The Extension Pack for Java supports Java version 1.8 or above.

Upvotes: 0

un0tec
un0tec

Reputation: 199

JDK 1.8 is supported by VSCode.

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

Update 2021

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.

Upvotes: 6

kgiannakakis
kgiannakakis

Reputation: 104188

As stated here:

Note: Although the Java language server requires JDK version 11 or above to run, this is NOT a requirement to your project's runtime.

This means that you need to have JDK 11 or higher installed. You can also install older JDKs and configure the runtimes. Just open the Command Palette (Ctrl+Shift+P) and type the command Java: Configure Java Runtime. If you have JDK 8 installed and have properly configured maven or gradle, this isn't even necessary. Visual Studio Code will correctly pick up the correct JDK.

Upvotes: 1

suwen
suwen

Reputation: 79

Java 1.8 was no longer supported since "Language support for Java" extension upgrade to 0.68.0, I downgraded to 0.64.1 which works for me.

Upvotes: 7

Galen Howlett
Galen Howlett

Reputation: 677

VS Code no longer supports JDK 1.8. The "Java Extension Pack" relies upon "Language Support for Java(TM) by Red Hat" which documents Java 11 is the minimum requirement. See here: https://marketplace.visualstudio.com/items?itemName=redhat.java

Tis unfortunate, guess I'm switching back to eclipse

Upvotes: 0

Related Questions