is this homework? I'll give this:
final Program p = Program.findProgram("pdf");
p.execute(printFilePath);
The "open with" dialog appears automatically when the OS does not know what to do with the file.
For more you'll need to post your own code that you have made up so far.