[Java] Ouvrir une page php

Résolu
jebok Messages postés 371 Date d'inscription   Statut Membre -  
 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


--
Merci de votre aide

4 réponses

  1. master
     
    Runtime.getRuntime().load("accueil.html");
    1
  2. jebok Messages postés 371 Date d'inscription   Statut Membre 51
     
    Quelqu'un a une idée ?
    0
  3. 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