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 - Supplying Arguments to run single class
Summary: Supplying Arguments to run single class
Status: RESOLVED DUPLICATE of bug 49636
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
Depends on:
Reported: 2004-11-24 21:14 UTC by tcumming
Modified: 2004-11-29 21:39 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
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
Comment 4 Jesse Glick 2004-11-29 21:39:26 UTC

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