java Program Option1 Option2
and you access them from "String[] args".
When you are running inside Netbeans, you need to provide the arguments by:
Right click the project / Properties / Run / Arguments
If you right click the Java file you are testing (the Main class) and select "Run File" the program runs but ignores the configured arguments.
To get around this, you have to right click the project and select "Run".
Enjoy!
No comments:
Post a Comment