prog
voila, j'ai trouvée ce code mais ça marche pas pour moi , j'utilise java5
import java.awt.*;
import java.io.*;
public class TestDekstop {
public static void main(String args[]) {
if (Desktop.isDesktopSupported()) {
Desktop desktop = Desktop.getDesktop();
if (args.length == 1) {
File fichier = new File(args[0]);
if (desktop.isSupported(Desktop.Action.OPEN)) {
System.out.println("Ouverture du fichier " + fichier.getName());
try {
desktop.open(fichier);
} catch (IOException ioe) {
ioe.printStackTrace();
}
}
}
}
}
}