I am trying to set command line arguments in a Netbeans 7.1 Java project on Windows 7 64 bit.
Netbeans is not passing the arguments I give it.
I go to Project –> Properties –> Run –> and type the arguments next to “Arguments” however the arguments are not passed to the program. How do I pass them?
I am guessing that you are running the file using
Run | Run File(or shift-F6) rather thanRun | Run Main Project. The NetBeans 7.1 help file (F1 is your friend!) states for the Arguments parameter:I verified this with a little snippet of code:
I set Run -> Arguments to
x y z. When I ran the file by itself I got no output. When I ran the project the output was: