Olá
Estou tentando carregar vários arquivos .jar e executa-los na sequencia
se alguém poder me ajudar
estou tentando fazer assim.
JFileChooser fc = new JFileChooser("Teste externo");
int opcao = fc.showOpenDialog(null);
if (opcao == JFileChooser.APPROVE_OPTION){
File[] files = fc.getSelectedFiles();
for (int i = 0; i < files.length.; i++) {
try {
System.out.println("Nome do arquivo:" + files[i].getCanonicalPath());
Runtime.getRuntime().exec("cmd.exe /c start " + files[i].getCanonicalPath());
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
} else {
System.out.println("não pegou nada");
}