Ouvrir un fichier Make

Résolu
zadji Messages postés 3 Date d'inscription lundi 30 mars 2009 Statut Membre Dernière intervention 19 avril 2009 - 19 avril 2009 à 13:25
follejava Messages postés 2 Date d'inscription jeudi 19 mars 2009 Statut Membre Dernière intervention 21 avril 2009 - 19 avril 2009 à 17:04
Salut tout Monde,

J'ai 1 Pb, je souhaiterai ouvrir un fichier Make (fichier de commande sous windows) dans un programme JAVA.(j'utilise eclipse)
Voilà ce je fait actuelement

Runtime r = Runtime.getRuntime();

Process p = r.exec("C:\\Java_Files\\MP3\\src\\mp3\\playlistMakerMake");

p.destroy();

Mais voilà, ça ne marche pas, il me dis qu'il y a une erreur de syntax.

QQ pourrait il m'aider?

1 réponse

follejava Messages postés 2 Date d'inscription jeudi 19 mars 2009 Statut Membre Dernière intervention 21 avril 2009
19 avril 2009 à 17:04
public class ProcessBuilderDemo {
 public static void main(String argv[])  throws InterruptedException, IOException{
  
java.awt.Desktop.getDesktop().open(new java.io.File "C:/WINDOWS/system32/cmd.exe"));  
}
}
essayez avec ça
bon courage
3
Rejoignez-nous