1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| public class TestPdf
{
private Runtime r;
private String name;
public TestPdf(String aName)
{
r = Runtime.getRuntime();
name = aName;
}
public void lancer()
{
try
{
r.exec("foxit-pdf-reader_foxit_pdf_reader_2.2_francais_13808.exe"+ name);
JOptionPane.showMessageDialog(null,"okok");
}
catch(Exception e)
{
System.out.println("Exception");
JOptionPane.showMessageDialog(null,"NoNO");
}
}
}
TestPdf pdf=new TestPdf("C:\\Document_Perenity\\pdf.pdf");
pdf.lancer(); |
Partager