8000 Unsupported JDK may throw UnsupportedClassVersionError · Issue #789 · microsoft/vscode-java-debug · GitHub
[go: up one dir, main page]

Skip to content

Unsupported JDK may throw UnsupportedClassVersionError #789

@testforstephen

Description

@testforstephen

The JDK release follows a strict 6 month cadence, when the user tries to run the standalone Java files with the latest JDK, sometimes they may meet the error UnsupportedClassVersionError. The reason is the extension may not catch up the support for the latest release yet.

Here is a typical error message.
image

57 is targeting to java 13, and 57.65535 is for java 13 preview. similarly 58 is for java 14. Usually high versions are backward compatible with older versions. JVM 14 can run java 13 (57), but it doesn't support the old preview version (57.65535). The openjdk website has claimed the reason that it would be costly for JDK 14 to support preview features from JDK 13 which were changed or dropped in response to feedback.

Reproduce steps:

  • Installed Language Support for Java extension 0.58.0. (Java extension starts to support JDK 14 since 0.59.0).
  • Install JDK 14 and set it to "java.home" user settings.
  • Run standalone java files in VS Code, the output will throw the UnsupportedClassVersionError.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0