Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open pdf file

Status
Not open for further replies.

specv

Programmer
Aug 8, 2001
42
CA
How can i open a specified pdf document and open with acrobat from java application?

Thanks

Phil
 
Use Runtime.exec, e.g.

// In windows 95/98
Runtime.getRuntime().exec("start mydoc.pdf");

// In windows NT
Runtime.getRuntime().exec("cmd.exe /c start mydoc.pdf");

Assuming that adobe acrobat is registered to open pdf files (this assumes windows), this should work. In Unix/Linux, you will have to use whatever pdf viewer is installed.d
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top