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.

Bug 44343

Summary: generated main method is not recognized as main
Product: guibuilder Reporter: maartenc <maartenc>
Component: CodeAssignee: issues@guibuilder <issues>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: P3    
Version: 4.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description maartenc 2004-06-04 12:52:31 UTC
Hi,

with the current development build of NetBeans
4.0, the main method of the JFrame template and
the JDialog template (and maybe others as well)
are not recognized as main.

For example, when I create a new JFrame Form and
name it "MyFrame", the generated main method is:

public static void main(String args[]) {
    new MyFrame().setVisible(true);
}

Now, if I try to execute it, NetBeans gives this
error message: "Class MyFrame does noet have a
main method." However, if I change the main method to

public static void main(String[] args) {
    new MyFrame().setVisible(true);
}

NetBeans suddenly sees the main method and I can
execute MyFrame.

I'm using:
- NetBeans 200406031800
- JDK 1.5 beta2
Comment 1 Milan Kubec 2004-06-04 17:41:23 UTC
Seems to be duplicate.

*** This issue has been marked as a duplicate of 43773 ***