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 51825

Summary: Supplying Arguments to run single class
Product: java Reporter: tcumming <tcumming>
Component: ProjectAssignee: Jesse Glick <jglick>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: P3    
Version: 4.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description tcumming 2004-11-24 21:14:01 UTC
4.0 beta 2. I didn't see a straightforward way to
supply command line arguments to run a single
class that has a main method in it. I have a large
project with many utilities with main. 

In 3.6 and prior you could right click on a source
module and supply command line arguments via the
properties dialog. Is this concept gone in 4.0?

I ended up hacking build-impl.xml to use
application.args property, but this is not correct.
Comment 1 Milan Kubec 2004-11-25 08:06:56 UTC
Supplying argument when running single class from editor or explorer
is not currently supported. You need to set that class as project Main
class (in Project properties, node Running Project) and there you can
set arguments that you wish. Please let us know if that fits you and
possibly close this issue if yes. Making RFE from the issue.
Comment 2 tcumming 2004-11-25 15:16:14 UTC
No, I think the previous behavior (e.g. 3.6) was preferred. You should
be able to provide arguments to a single class as before. As I said, a
large project can have many utility classes with main methods in them.

It is very awkward to have to make that class the main class for the
project and re-enter parameters.
Comment 3 Martin Matula 2004-11-26 20:10:25 UTC
java/code->java/project
Comment 4 Jesse Glick 2004-11-29 21:39:26 UTC

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