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.
Along with action 'Run File' there should be action 'Run File with Arguments' that would allow user to run selected file with arguments. Users might have more than one main class in project for testing purposes and it's really bad to force them to set the class as project main class for running it with some arguments.
This issue was reported through NetCAT program.
As I had originally reported in NetCat program. Scenario: 1. I have a Java application that I created in NB4.0 with only one class (it is a main class). 2. This class takes 2 commandline arguments. I right click the project name in project view->properties->running project->Arguments and enter my 2 commandline arguments. 3. I can then right click the project name and run project, everything is fine. BUT... If I just run the file, the arguments are not passed!!! So this is not too bad... as I can just run at the project level... but what if I have 2 main classes? Do I have to continually change the parameters at the project level and also what the project considers to be the main class??? This is a wicked pain as most of my classes have a main harness that I use during development... this seems to be slowing me down considerably with my console applications and libraries. I feel this is a very important enhancement especially for novice users who may not realize that arguments are not even going to the class they are running! Very frustrating!
Agree that this needs to be fixed for 4.1 but shouldn't impact the release of 4.0. I also feel that it would be great to allow a user to create multiple "run profiles" per project / class so that you could easily switch between profiles containing different arguments for the purposes of testing.
*** This issue has been marked as a duplicate of 49636 ***