File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

open a file pdf in unix using java

 
Monica Marugan
Greenhorn
Posts: 6
  • 0
  • 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
  • 0
  • 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: 42966
73
  • 0
  • 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: 20369
44
Chrome Eclipse IDE Java Windows
  • 0
  • 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, ???).
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic