Bonjour,
je veux à travers un bouton pouvoir lancer une page web :
voici le code que le bouton exécute:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
Properties sys = System.getProperties();
	            	String os = sys.getProperty("os.name");
	            	Runtime r = Runtime.getRuntime();
	            	try{
	            	    if (os.startsWith("fedora"))
	            	        r.exec("mozilla www.google.fr");
	            	    else if (os.endsWith("NT")||os.endsWith("2000")||os.endsWith("XP"))
	            	        r.exec("cmd /c start www.google.fr");
	            	    else
	            	        r.exec("mozilla http://localhost/nagios/");
	            	}catch (IOException eo) {
	            	    System.err.println(eo.getMessage());
	            	}
mais j'ai le message d'erreur suivant :
java.io.IOException: mozilla: not found
j'ai enlevé mozilla et ça ne fonctionne pas non plus.
java.io.IOException: http://localhost/nagios/: not found
merci de votre aide.

Ps: j'ai fedora6.