Lancer Acrobat reader dans une fonction Java

Fermé
Gaëlle - 2 avril 2002 à 09:06
 ilemaitr - 10 mars 2008 à 18:19
Salut !

Est-il possible de lancer Acrobat reader avec un fichier en paramètre depuis une fonction Java ?
Quelque chose comme Acrobat.exe nom_fichier_et_path.pdf

Merci !
A voir également:

1 réponse

Pour ceux qui comme moi ont la même question, cela fonctionne très bien.

public class ShowPDF {
public static void main(String[] args) throws Exception {
Process p =
Runtime.getRuntime()
.exec("rundll32 url.dll,FileProtocolHandler c:/pdf/mypdf.pdf");
p.waitFor();
System.out.println("Done.");
}
}

trouvé sur le site
https://www.rgagnon.com/javadetails/java-0014.html
1