Skip to content

Don't emit "Implicitly Declared Classes and Instance Main Methods is a preview feature and disabled by default." in Compact Source Files + OpenJDK 25 #4126

@tats-u

Description

@tats-u
  1. Do either of:
    • Download OpenJDK 25 from https://jdk.java.net/25/, extract it, and place it at some place
    • Install Eclipse Temurin 25 or something similar
  2. Create a .java file:
    void main() {
        IO.println("Hello, world!");
    }
  3. Set java.jdt.ls.java.home to the extracted directory if the path to java is not set
  4. Open the .java file
  • Expected: no errors in favor of JEP 512 (stable)
  • Actual: Implicitly Declared Classes and Instance Main Methods is a preview feature and disabled by default. Use --enable-preview to enableJava(4195407)

Metadata

Metadata

Assignees

No one assigned

    Labels

    javaPull requests that update java code

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions