navneetkarnani opened a new issue, #6507: URL: https://github.com/apache/netbeans/issues/6507
### Apache NetBeans version Apache NetBeans 19 ### What happened I created a "Hello World" maven project using the Netbeans extension on VS Code to demonstrate the "main" method simplification. After ensuring the command line based maven build works, I can still see an error on the VS Code console. ### How to reproduce pom should look similar to: ``` <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>myproject</groupId> <artifactId>sample</artifactId> <version>1.0-SNAPSHOT</version> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.release>21</maven.compiler.release> <maven.compiler.enablePreview>true</maven.compiler.enablePreview> <exec.mainClass>Hello</exec.mainClass> </properties> </project ``` The Java file ( Hello.java ) looks like: ``` void main() { System.out.println("Hello"); } ``` Error message on the VS Code Problems panel: `unnamed classes are a preview feature and are disabled by default. (use --enable-preview to enable unnamed classes)` ### Did this work correctly in an earlier version? No / Don't know ### Operating System Ubuntu 22.04 ### JDK OpenJDK 64-Bit Server VM Microsoft-8425986 (build 21+35-LTS, mixed mode, sharing) ### Apache NetBeans packaging Apache VSNetBeans for VSCode ### Anything else I am using the Docker container from Microsoft: mcr.microsoft.com/openjdk/jdk:21-ubuntu I use the maven wrapper, so no OS level installation of mvn. ### Are you willing to submit a pull request? Yes -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
