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.
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.
Will take a look at it, something must have changed, it worked not a long time ago.
core-main #7a47f85d41ce Run/Debug file now falls back to Test/Debug Test File when no main method is present.
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
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.
In case it's helpful, I think this issue is related: http://www.netbeans.org/issues/show_bug.cgi?id=152741