Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

open a file pdf in unix using java

 
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
Pie
Posts: 42967
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
Pie
Posts: 20495
54
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, ???).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic