Bin euh... t'es sûr que tu veux récupérer l'OutputStream du process, déjà ? Passke si ce que tu veux c'est afficher les sorties du process, bin te casse pas, c'est de l'InputStream dont t'as besoin
Exemple :
Code :
- try
- {
- Process p = Runtime.getRuntime().exec("C:\\WINNT\\system32\\IPCONFIG.exe" );
- BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
- String inputLine;
- while ((inputLine = in.readLine()) != null) System.out.println(inputLine);
- }
- catch(Exception e)
- {
- e.printStackTrace();
- }
|
Là t'auras la sortie de la commande ipconfig.
Message édité par Taiche le 16-10-2002 à 17:22:46
---------------
Everyone thinks of changing the world, but no one thinks of changing himself | It is the peculiar quality of a fool to perceive the faults of others and to forget his own | Early clumsiness is not a verdict, it’s an essential ingredient.