OVH Cloud OVH Cloud

URL launcher

2 réponses
Avatar
jpochat
Bonjour

Je recherche une classe qui à partir d'une URL lance l'outil client
correspondant au protocole utilisé (exemple sous Windows, IE pour
"http:", Outlook pour "mailto:", ...). L'API doit être la plus simple
possible, genre Runtime.exec.

Quelqu'un a des infos, exemples, ... ?

Merci d'avance

2 réponses

Avatar
Real Gagnon
Je recherche une classe qui à partir d'une URL lance l'outil client
correspondant au protocole utilisé (exemple sous Windows, IE pour
"http:", Outlook pour "mailto:", ...). L'API doit être la plus simple
possible, genre Runtime.exec.


Runtime.getRuntime().exec
("rundll32 SHELL32.DLL,ShellExec_RunDLL " + file.getAbsolutePath());

Bye.
--
Real Gagnon from Quebec, Canada
* Looking for Java or PB snippets ? Visit Real's How-to
* http://www.rgagnon.com/howto.html

Avatar
jpochat
Real Gagnon wrote in message news:...
Je recherche une classe qui à partir d'une URL lance l'outil client
correspondant au protocole utilisé (exemple sous Windows, IE pour
"http:", Outlook pour "mailto:", ...). L'API doit être la plus simple
possible, genre Runtime.exec.


Runtime.getRuntime().exec
("rundll32 SHELL32.DLL,ShellExec_RunDLL " + file.getAbsolutePath());

Bye.


Merci.
Mais, je recherche une solution portable.