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 158904 - "Class "null" does not have a main method."
Summary: "Class "null" does not have a main method."
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: rmichalsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-20 16:21 UTC by Jesse Glick
Modified: 2009-05-18 16:39 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2009-02-20 16:21:38 UTC
When trying to use Shift-F6 on a test (I know, this isn't support any more...) you get this message. I guess apisupport
failed to insert the actual class name.
Comment 1 rmichalsky 2009-04-09 15:17:04 UTC
Will take a look at it, something must have changed, it worked not a long time ago.
Comment 2 rmichalsky 2009-05-05 14:39:37 UTC
core-main #7a47f85d41ce

Run/Debug file now falls back to Test/Debug Test File when no main method is present.
Comment 3 Quality Engineering 2009-05-07 07:50:09 UTC
Integrated into 'main-golden', will be available in build *200905070201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/7a47f85d41ce
User: Richard Michalsky <rmichalsky@netbeans.org>
Log: #158904: run/debug file now falls back into run/debug test when no main method found
Comment 4 Jesse Glick 2009-05-14 23:06:34 UTC
I think the original logic (showing an error dialog) was correct; at least j2seproject correctly runs it as a main
class. The problem was just the error message (maybe a MessageFormat issue). Magically switching to a different action
is not a good idea, I think.
Comment 5 tomwheeler 2009-05-18 16:39:30 UTC
In case it's helpful, I think this issue is related:

   http://www.netbeans.org/issues/show_bug.cgi?id=152741