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 56634

Summary: Allow running main class in test sources
Product: java Reporter: Petr Jiricka <pjiricka>
Component: ProjectAssignee: Jan Jancura <jjancura>
Status: RESOLVED DUPLICATE    
Severity: blocker CC: cemerick
Priority: P3    
Version: 4.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description Petr Jiricka 2005-03-18 10:23:17 UTC
Currently, when running a file (Shit+F6) in the Test Sources, the project
attempts to run the currently selected class using JUnit. However, for classes
with main() method which are not JUnit tests, it would be useful to run the
main() method instead.
 
Filing on behalf of Mark.deReeper at sun.com.
Comment 1 cemerick 2008-08-19 11:52:52 UTC
This has sat dormant for a long time.  Doing this in eclipse (for example) is trivial.  Simply providing the option of
adding the test classpath entries to a run configuration would do the trick...
Comment 2 ulim 2009-02-13 10:02:48 UTC
Another example for the need of a main class under test: stress tests.
Comment 3 ulim 2009-07-08 10:57:59 UTC

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