Properties sys = System.getProperties(); String os = sys.getProperty("os.name"); Runtime r = Runtime.getRuntime(); try { if (os.endsWith("NT")||os.endsWith("2000")||os.endsWith("XP")) r.exec("cmd /c start le chemin de ton pdf"); else r.exec("start le chemin de ton pdf"); } catch (IOException ex) { ex.printStackTrace(); }