-
.exe en code java
bonjour,
je vais lancer une interface graphique à partir d'un code java:
Code:
process = runtime.exec(new String[] {"C:\\Documents and Settings\\ahedhili\\Bureau\\gcluto_1_0\\gcluto-1.0\\windows\\gcluto.exe"});
mais avant que l'interface s'affiche j'ai ce message d'erreur :
05/05/08 10:55:23: Can't load image from file '../images/icon-project.png': file does not exist.
05/05/08 10:55:23: Can't load image from file '../images/icon-data.png': file does not exist.
05/05/08 10:55:23: Can't load image from file '../images/icon-solution.png': file does not exist.
05/05/08 10:55:23: Can't load image from file '../images/icon-matrix.png': file does not exist.
05/05/08 10:55:23: Can't load image from file '../images/icon-mountain.png': file does not exist.
05/05/08 10:55:23: Can't load image from file '../images/gcluto-splash.png': file does not exist.
05/05/08 10:55:23: Can't load image from file '../images/icon-project.png': file does not exist.
05/05/08 10:55:23: Couldn't add an image to the image list.
05/05/08 10:55:23: Couldn't add an image to the image list.
05/05/08 10:55:23: Couldn't add an image to the image list.
05/05/08 10:55:23: Couldn't add an image to the image list.
05/05/08 10:55:23: Couldn't add an image to the image list.
-
il faut utiliser la méthode exec(String command, String[] envp, File dir) de http://java.sun.com/j2se/1.4.2/docs/...g/Runtime.html
En spécifiant le répertoire File où doit être exécuté la commande (donc a priori : new File("C:\\Documents and Settings\\ahedhili\\Bureau\\gcluto_1_0\\gcluto-1.0\\windows\\");
-
command - a specified system command.
envp - array of strings, each element of which has environment variable settings in format name=value.
dir - the working directory of the subprocess, or null if the subprocess should inherit the working directory of the current process.
j'ai pas bien compris ce que je dois mettre en envp et dir.
-
Code:
exec(tacommande, null, new File("C:\\Documents and Settings\\ahedhili\\Bureau\\gcluto_1_0\\gcluto-1.0\\windows\\"));
-