This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
hey guys , am having some trouble with the following code snippet
I don't understand this code , the File should be given its path why is it so that it is given arguments of main method as input ? And also i am currently using NetBeans IDE, how to pass arguments of main method ?? Thanks in advance !
vamsi acharya wrote:
No problem hope anyone else can answer me that , can you please illustrate me how to enter path in main arguments in conventional way ??
It slightly different, depending on the version you are using, so take these instructions with a grain of salt.
Instead of just choosing the "run as" --> "application" option, choose "run configurations...". With some versions of eclipse, it may be named something slightly different. This should open a popup. Look for an "arguments" tab -- this should allow you to enter the command line arguments to give to the application.
[EDIT: it looks like from your first post, that you are using NetBeans, and not eclipse -- sorry, I don't use NetBeans]