public void ouvrirPageWeb(String url) {
Properties sys = System.getProperties();
String os = sys.getProperty("os.name");
Runtime r = Runtime.getRuntime();
try {
if (os.endsWith("NT") || os.endsWith("2000") || os.endsWith("XP")) {
r.exec("cmd /c start " + url);
} else {
r.exec("start " + url);
}
} catch (IOException ex) {
System.out.println("ex.printStackTrace()");
}
}
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire