Preview features enabled at an invalid source release level 13, preview can be enabled only at source level 14Java(2098258)

A K :

VS Code is showing anomalous behaviour from into my pc from the last couple of days. I am not able to run a simple java code. At the beginning it's it's giving an error:

> Preview features enabled at an invalid source release level 13, preview can be enabled only at source level 14Java(2098258)

The compilation result ends with: `

Error: Could not find or load main class Lol Caused by: java.lang.ClassNotFoundException: Lol

Lol is the class name in which I have defined the main method.

class Lol
{
  public static void main(String args[])
  {
    System.out.println("write the String");
  }
}

Every time I am stating a new project it's showing me the exact same result and end up giving this error for all the current and previously build java codes.

I have installed jdk14 into my pc and added the path properly to after reading some solution on stackoverflow. But this does not help at all.

Can Anybody tell me where the problem is exactly ???

xerx593 :

Visual Studio Code works with all major Java versions from various vendors up to 13.

Source: https://code.visualstudio.com/docs/languages/java (OP date)

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=388875&siteId=1