Je suis dans mon code java
J'arrive sans problème à éxécuter un commande bat à l'aide
de la classe runtime et de la fonction exec :
String pathname = "D:\\LOCAL\\instantiation";
File dir = new File( pathname) ;
String temp[]={"D:\\LOCAL\\instantiation\\instantiate.bat", "-I", "-P", "admin"};
Runtime.getRuntime().exec(temp,null,dir);
jesouhaite passer en adresse relative ... j'ai essayé des trucs du genre
String pathname = "..\\instantiation";
File dir = new File( pathname) ;
String temp[]={"..\\instantiate.bat", "-I", "-P", "admin"};
Runtime.getRuntime().exec(temp,null,dir);
mais ça ne marche pô
Partager