Ola pessoal, estou com dúvida, quem puder me ajudar eu agradeço…
é o seguinte, eu preciso rodar um programa, que precisa entrar com 3 argumentos pelo args[], um é um arquivo .ini, outro um número inteiro e o outro um arquivo.txt , porém não estou conseguindo especificar estes argumentos, estou usando o netbeans 6.9.1
um pedaço do código:
[code]public static void main(String[] args) throws Exception {
// Prepare arguments
if (args.length == 0 || Announce.isHelp(args[0])) {
Announce.help(" sofie.parsing.Parser [<ini-file>] [<start>] <files>...\n", "Parses the files and stores the patterns in the database.",
"<ini-file> an initialization file that defines the database and other parameters.", " Defaults to sofie.ini .",
"<start> the number of the file to start with if interrupted (defaults to 1)",
"<files> a list of files (possibly given with wildcards) that will be parsed.");
}
List<String> filenames = new ArrayList<String>(Arrays.asList(args));
File iniFile = new File("sofie.ini");
if (args[0].endsWith(".ini")) {
iniFile = new File(filenames.get(0));
filenames.remove(0);
}
int start = 1;
if (NumberParser.isInt(filenames.get(0))) {
start = NumberParser.getInt(filenames.get(0));
filenames.remove(0);
}
Parser parser=new Parser(iniFile, start > 1);
parser.parse(filenames, start);
parser.close();[/code]
Eu coloco os argumentos clicando no projeto com botão direito, propriedades, executar e listo os argumentos, porém não dá certo
eu coloco: sofie.ini 1 testdoc.txt que são os argumentos que tenho que por
alguém poderia me dar uma ajuda?
valeu