IDE - netbeans - Class "package.MyClass" does not have a main method

Hello Friends, i have problem with IDE netbeans, in other IDEs don’t produce it error. I installed netbeans with ‘apt’, i try change other JDK but preserve problem, any know why happen and how to resolve?
My system is:
VERSION="20.04.1 LTS (Focal Fossa)"
JAVA;JAVAC;JAR:
openjdk 11.0.8 2020-07-14
OpenJDK Runtime Environment (build 11.0.8+10-post-Ubuntu-0ubuntu120.04)
OpenJDK 64-Bit Server VM (build 11.0.8+10-post-Ubuntu-0ubuntu120.04, mixed mode, sharing)
javac 11.0.8
jar 11.0.8

Code default:
package javaapplication9;

/**
 *
 * 
 */
public class JavaApplication9 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
    }
}

Hey there,

I think you might want to ask this on Stack Overflow or some other site.

This site is for the co-ordination of the Ubuntu project(s), and other non-support matters.

For Ubuntu Support options, please have a look at https://community.ubuntu.com/t/finding-help/709