I tried running an exe file from
java application using the class Runtime like
class Notepad
{
public static void main(
String arg[])
{
try
{
Runtime r = Runtime.getRuntime();
r.exec("C:\\Winnt\\NOTEPAD.EXE");
}
catch(Exception e) {}
}
}
in a Windows NT machine. While running it, it works fine and the application Notepad.exe is opened.
My doubt is that is it possible to open a particular file like
class open
{
public static void main(String arg[])
{
try
{
Runtime r = Runtime.getRuntime();
r.exec("S:\\java-21\\ar.pdf");
}
catch(Exception e) {}
}
}
when i run this nothing is opened and no runtime error is comming. please clear this (with code if possible).
Thanks,
Sakthi.