I'm not sure if this is kosher, but in this situation where I need easy access to the command line args, I just run my
java prog from another helper prog. For instance if I have a main prog called MainProg, I rename the main method to "myMain" and call it from a second Java prog:
and I have a helper class called RunMain (or whatever) that has something like this:
and I have a helper class called RunMain (or whatever) that has something like this:
This way I can change my command line args at will.
String[] commandLineArgs = {"Pete", "Stein", "is", "great!"};
MainProg.myMain(commandLineArgs);
}
}
[/CODE]
This way I can change my command line args at will in the code.
[ March 15, 2007: Message edited by: pete stein ]