If You want to open a file then simply you can execute a command from your
java program to open that file.
if you want to get the file abc.pdf opened, You can use the following command...
String command = "abc.pdf";
Process child = Runtime.getRuntime().exec(command);
Before you are using this command set the path of the file....in command line with your java program like
if the file is in "c:/My Files/abc.pdf" then
String command = "cd c:/My Files";
Process child = Runtime.getRuntime().exec(command);