Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

open a file pdf in unix using java  RSS feed

 
Monica Marugan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a file pdf in a path in SO UNIX and I need open this file with java code.
In windows I have used :

Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + fichpdf);

In unix I don't know do.
Thank you
 
Anil Karamchandan
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
has anyone got a reply to this ? I have the same problem
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the Acrobat Reader can be started from the command line in Unix.
 
Rob Spoor
Sheriff
Posts: 20895
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If there is a proper file association then Desktop.open should work. Otherwise you would need to explicitly give the command, including the path to the PDF program (Acrobat Reader, XPDF, ???).
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!