I am trying to open a PDF file from java using the command line argument as
String command = "cmd /c start AcroRd32.exe \"" + dir + "\"";
But i am getting an error when the file will be automatically opened as
"Windows cannot find 'acroRd32.exe'. Please make sure you typed the correct name."
However i am able to open it manually without using the command line/java.
Please help me out.
I am not sure that this is really useful but it works to open pdf file.
I strongly recommend that you do it this way instead.
If you still want to run "AcroRd32.exe" (or some other "command") use a ProcessBuilder, with something like this -
other wise use class desktop