This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Given two classes public class C1 { public static void main(String[] args) { System.out.println(this.getClass()); } } public class C2 extends C1 { } the IDE does not identify C2 as an executable class though it can be run from the console with java --classpath=. C2 because C2 inherits the main method from C1. Best regards Xypron
It's a corner case. >because C2 inherits the main method from C1 In fact it's not inherited as it's static, it's only in scope of. You can set it to be a main in Project properties/Run/Main Class. You will need to type it by hand, it's not available in selection as it has no main method - and this is desired behavior. But I can change the "Run File" action to allow such a class to be executed as in case of run project (it's allowed there).
Fixed jet-main 192e9324510f
Integrated into 'main-golden', will be available in build *201104120401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/192e9324510f User: Tomas Zezula <tzezula@netbeans.org> Log: #197445:Inherited main