Bonjour tout le monde
je dois éxécuter un job talend depuis un programme java avec DOS
commande suivante :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
 try {
 
            Runtime runtime = Runtime.getRuntime();
 
            String[] args = {"cmd.exe", "/C", "cd " + jobsDirectory + job + "\\" + job.substring(0, job.length() - 4) + " & java -Xms256M -Xmx1024M -cp classpath.jar; importationsql." + job.toLowerCase().replace(".", "_") + "." + job.substring(0, job.length() - 4) + " --context_param RemoteSQL_Server=TEST2 --context_param RemoteSQL_Port=1433 --context_param RemoteSQL_Database=UNITEST_" + SelectionClient.nomClientChoisi + " --context_param RemoteSQL_Login=sa --context_param RemoteSQL_Password=sql --context_param cheminDuFichier=" +"\""+ path+"\""};
 
            System.out.println(args[2]);
            final Process process = runtime.exec(args);
 
            // TODO add your handling code here:
        } catch (IOException ex) {
           // Logger.getLogger(UNIDBView.class.getName()).log(Level.SEVERE, null, ex);
            System.out.println(ex.getStackTrace());
        }
je veux pouvoir récupérer les erreurs java pour traiter les erreurs comment faire ?