Tuesday, February 10, 2015

Running the java with command line arguments in Eclipse

Here are the steps.
  1. Write your program that is going to access the command line args.
  2. Select the project  from project explorer and go to Run->Run Configurations
  3. In the new window click the Java application
  4. Right Click Java Application and select new.
  5. In the next window If project is not mentioned , select it using the browse button.
  6. If main class is not mentioned, select it as well using the search button
  7. Click the Arguments tab
  8. In the next screen give one parameter in one line and click apply and close
  9. Done, now when you select your class, right click and say run  it will ask for the Run Configuration if there are more than one other wise use the only one available.