[Java] Ouvrir une page php

Résolu
jebok Messages postés 358 Date d'inscription   Statut Membre Dernière intervention   -  
 Yassine Guadina -
Bonjour,

comment faire pour ouvrir une page php (ou html) depuis une appli Java ?
J'ai essayé avec
Runtime.getRuntime().exec(http://www.site.com/page.php);

mais j'obtiens l'erreur suivante :
CreateProcess: http://www.site.com/index.php error=2

A voir également:

4 réponses

master
 
Runtime.getRuntime().load("accueil.html");
1
jebok Messages postés 358 Date d'inscription   Statut Membre Dernière intervention   51
 
Quelqu'un a une idée ?
0
mookie
 
non
0
Yassine Guadina
 

Runtime r = Runtime.getRuntime();

try{
r.exec("cmd /c start http://www.google.fr/");
System.out.println("Ouverture réussi");
}

catch (IOException ex){
ex.printStackTrace();
System.out.println("Ouverture échoué");
}
0