Showing posts with label SOLution : How to pass cmd line arguments?. Show all posts
Showing posts with label SOLution : How to pass cmd line arguments?. Show all posts

Wednesday, September 10, 2008

Hi Rathna

First write the code for it

public static void main(String[] args) {

System.out.println(args[0]);

System.out.println(args[1]);

System.out.println(args[2]);

}

Click on " Project name " under project pane on the left side, right click and go to "properties" , in that click on "Run" and U find arguments in right pane. Give your arguments and click OK and run the program.

U can also refer this link.

http://www.javapassion.com/javaintro1/slides/JEDI%20Slides-Intro1-Chapter08-CommandLine%20Arguments.pdf