Viewer viewer = new Viewer (); viewer. setupViewer (); viewer. executeCommand ( Commands . OPENFILE , new Object [] { "pdfFile.pdf" });