You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
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
Actual: Implicitly Declared Classes and Instance Main Methods is a preview feature and disabled by default. Use --enable-preview to enableJava(4195407)
^ Yes. Classes have started and this needs to be addressed for any of the "implicitly declared classes and instance main methods" JEPs (512 most recently, and the only non-preview one) to be useful for beginners.
It doesn't make sense for us to have to jump through configuration hoops to have access to the JEP, or to have to ignore the Play button and instead run programs through the terminal. Students will naïvely follow whatever proposed corrections are presented and end up with Standard Java at best, a lot of random, broken code at worst.
^ Yes. Classes have started and this needs to be addressed for any of the "implicitly declared classes and instance main methods" JEPs (512 most recently, and the only non-preview one) to be useful for beginners.
It doesn't make sense for us to have to jump through configuration hoops to have access to the JEP, or to have to ignore the Play button and instead run programs through the terminal. Students will naïvely follow whatever proposed corrections are presented and end up with Standard Java at best, a lot of random, broken code at worst.
Well... Java 25 isn't General Availability until the September 16th (10 days from this post). How long after that will it be for JavaSE-25 to be available in VS Code, or is the new version added essentially on the GA date?
Actual: Implicitly Declared Classes and Instance Main Methods is a preview feature and disabled by default. Use --enable-preview to enableJava(4195407)
The list of configurable runtimes does not include JavaSE-25 yet. So even if with a more recent JDK, both jdt (default compiler) and javac (experimental compiler via jdt.ls.javac.enable --> on) are limited to JavaSE-24.
changed the title [-]Don't emit "Implicitly Declared Classes and Instance Main Methods is a preview feature and disabled by default." in OpenJDK 25 EA[/-][+]Don't emit "Implicitly Declared Classes and Instance Main Methods is a preview feature and disabled by default." in Compact Source Files + OpenJDK 25[/+]on Sep 26, 2025
The behaviour here was expected prior to the release of Java 25. It was only released in September, as you've noted. See eclipse-jdtls/eclipse.jdt.ls#3536 (comment) . This should behave as expected.
Closing for now, but let me know if there are still issues.
This hasn't been released yet. That's expected early October, but the vscode-java pre-releases contain the support.
Activity
physcrowley commentedon Sep 10, 2025
^ Yes. Classes have started and this needs to be addressed for any of the "implicitly declared classes and instance main methods" JEPs (512 most recently, and the only non-preview one) to be useful for beginners.
It doesn't make sense for us to have to jump through configuration hoops to have access to the JEP, or to have to ignore the Play button and instead run programs through the terminal. Students will naïvely follow whatever proposed corrections are presented and end up with Standard Java at best, a lot of random, broken code at worst.
physcrowley commentedon Sep 10, 2025
Well... Java 25 isn't General Availability until the September 16th (10 days from this post). How long after that will it be for JavaSE-25 to be available in VS Code, or is the new version added essentially on the GA date?
physcrowley commentedon Sep 10, 2025
The list of configurable runtimes does not include JavaSE-25 yet. So even if with a more recent JDK, both jdt (default compiler) and javac (experimental compiler via jdt.ls.javac.enable --> on) are limited to JavaSE-24.
[-]Don't emit "Implicitly Declared Classes and Instance Main Methods is a preview feature and disabled by default." in OpenJDK 25 EA[/-][+]Don't emit "Implicitly Declared Classes and Instance Main Methods is a preview feature and disabled by default." in Compact Source Files + OpenJDK 25[/+]rgrunber commentedon Sep 26, 2025
The behaviour here was expected prior to the release of Java 25. It was only released in September, as you've noted. See eclipse-jdtls/eclipse.jdt.ls#3536 (comment) . This should behave as expected.
Closing for now, but let me know if there are still issues.
This hasn't been released yet. That's expected early October, but the vscode-java pre-releases contain the support.
tats-u commentedon Sep 27, 2025
Confirmed that it does work in the latest pre-release version.
physcrowley commentedon Sep 27, 2025
Same here. I had all students switch versions yesterday and we are good to go!