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 223607 - Main method cannot be run in a NetBeans module
Summary: Main method cannot be run in a NetBeans module
Status: NEW
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Martin Kozeny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-10 14:36 UTC by markiewb
Modified: 2013-02-14 13:17 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description markiewb 2012-12-10 14:36:08 UTC
[ BUILD # : 201212050001 ]
[ JDK VERSION : 1.7.0_09 ]

Steps:
* create a NB Module using the 'new project' wizard
* create a java class with a main method

ACTUAL: 
the class with the main method cannot be run (the run file action is disabled)

EXPECTED:
the class with the main method  run (the run file action is enabled and
working)

FYI: 
* The same class works in a standard java application.
* http://netbeans.org/bugzilla/show_bug.cgi?id=89714
* http://netbeans.org/bugzilla/show_bug.cgi?id=223062 (does not work in maven
projects too)

Product Version: NetBeans IDE Dev (Build 201212050001)
Java: 1.7.0_09; Java HotSpot(TM) 64-Bit Server VM 23.5-b02
Runtime: Java(TM) SE Runtime Environment 1.7.0_09-b05
System: Windows 7 version 6.1 running on amd64; Cp1252; de_DE (nb)
Comment 1 Ondrej Vrabec 2012-12-10 17:31:24 UTC
Did it sometimes work? According to http://hg.netbeans.org/core-main/file/56b61610edb4/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/ModuleActions.java#l217 the action is available only for test files - intentionally??
Comment 2 markiewb 2012-12-10 19:33:26 UTC
(In reply to comment #1)
> Did it sometimes work? According to
> http://hg.netbeans.org/core-main/file/56b61610edb4/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/ModuleActions.java#l217
> the action is available only for test files - intentionally??

Yes. "The same class works in a standard java application."
Comment 3 Ondrej Vrabec 2012-12-11 08:40:59 UTC
> Yes. "The same class works in a standard java application."
I meant, did it ever work for NB module project?
Comment 4 Milos Kleint 2012-12-11 08:44:41 UTC
AFAIK it was never implemented in module projects, please note that making it work requires adding build script targets to the apisupport harness most likely.