Problem in opening pdf file in linux

how can i open a pdf file in linux(openSuse)..i can open .doc, .xls, .pdf in windows using the code.. its working fine..
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + path_of_PDF);like that i want to open in linux...
i would be very grateful to you and i need help..plz
plz............
Thanks in Advance....

I've used code like
File path=new File("/home/RichHelp.pdf");                Runtime.getRuntime().exec("Desktop.getDesktop().open()"+path);i'm getting these errors
java.io.IOException: Cannot run program "Desktop.getDesktop().open()/home/RichHelp.pdf": java.io.IOException: error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
at java.lang.Runtime.exec(Runtime.java:593)
at java.lang.Runtime.exec(Runtime.java:431)
at java.lang.Runtime.exec(Runtime.java:328)
at richwoods.MasterScreen.actionPerformed(MasterScreen.java:795)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1216)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1257)
at java.awt.Component.processMouseEvent(Component.java:6038)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
at java.awt.Component.processEvent(Component.java:5803)
at java.awt.Container.processEvent(Container.java:2058)
at java.awt.Component.dispatchEventImpl(Component.java:4410)
at java.awt.Container.dispatchEventImpl(Container.java:2116)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
at java.awt.Container.dispatchEventImpl(Container.java:2102)
at java.awt.Window.dispatchEventImpl(Window.java:2429)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
at java.lang.ProcessImpl.start(ProcessImpl.java:65)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
... 31 more

Similar Messages

  • Problem with opening PDF files in Google Chrome browser

    We have a web page displaying links to dynamically generated PDF files located on the internal repository. This files are not just text PDF files but PDF forms created using XFA technology. This means that they must be opened and filled only in Adobe Reader and not in Foxit Reader or browser's built-in PDF viewer.
    Now, the problem is that a Google Chrome browser opens any PDF file using its own PDF viewer. And I want to force this browser to open PDF files in Adobe Reader.
    How can I achieve this without disabling 'Chrome PDF Viewer' plugin since I can't do this for all users of our web site?
    Any help or advice would be greatly appreciated.
    P.S. We use LiveCycle ES3.

    Each user would have to set each browser individually.
    Note: I don't think it's possible to set the default PDF viewer with code for every user who visits the site.
    See the following link to enable Adobe Reader as the default PDF viewer in different browsers:
    http://helpx.adobe.com/acrobat/using/display-pdf-browser-acrobat-xi.html
    Note: Not all PDF viewer browser plug-ins support PDF submissions, and most 3rd party viewers may not support forms created with LiveCycle or forms with Extended Reader Rights enabled.

  • Open PDF file in linux using java

    Hi..
    How can I open a PDF file in linux using java.
    I am able to open PDF in windows and mac using this code
    in Windows
    Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + path_of_PDF);
    in mac
    Runtime.getRuntime().exec("open " + path_of_PDF);
    But nothing is working with linux.
    Please help
    Thanks

    appi wrote:
    Hi.. I found the JDIC binary files. There are different binaries for all the plateform. Is there any solution which is independent of plateform.Yes, and we already told you: Use JDK6, which has those libraries built into the standard class library.
    How can I use these binaries in my existing project. does it work, If I place them at same place where other .class files are kept.Read the documentation of the JDIC project. I'm sure they answer this question in their FAQ.

  • Problem on opening pdf file in IE inline (through streaming method)

    Hello
              I had a problem opening pdf file at IE through streaming. I create a page
              that have a hyperlink to open the new window and talk to a serlvet. When
              clicked, this serlvet will stream a pdf file from the file server to serlvet
              output stream. And the pdf file will be displayed within the browser.
              The problem comes that I can see the Acrobat Reader trailer screen display
              but the brower show nothing. I click refresh button to that serlvet to
              reload then it come up the content.
              Is anyone have the same trouble on this and any solution will be
              appreciated.
              Rondy Lee
              State Street Australia Ltd.
              

    Hello Rondy,
              You vae set mime type to application/pdf, which is good. But IE doesn't care
              of it !
              And I think your URL is too long because and I'm sure it leads to a buffer
              overflow (as they say at MS in their bug report).
              So as a workaround, you can rename your servlet mapping from Ecd/Download to
              Ecd/Download.pdf if you can, or make the URL length much more smaller.
              Try to go to MS site to find what is the precise bug#. I can't remember what
              it its number.
              I hope you'll find a solution.
              Dom
              "Rondy Lee" <[email protected]> a écrit dans le message news:
              [email protected]...
              > Thanks Dom, I will try to find it out
              >
              > This is the sample URL I used on local host:
              >
              http://ausyd1-wdev-01:7001/Datalightning/Ecd/Download?EcdId=20&Type=I&OpenMo
              > de=O&OutputType=PDF
              >
              > Also, I set content-deposition to "inline" to enforce IE to open the pdf
              > file. Content Type is application/pdf
              >
              > I hope this can tell more information.
              >
              > Rondy.
              >
              > State Street Australia Ltd.
              >
              > "Dominique Jean-Prost" <[email protected]> wrote in message
              > news:[email protected]...
              > > Hello Rondy.
              > >
              > > I already had problems using servlet streaming a pdf file to IE.
              > > What is the exact URL of your servlet ? IE has a bug : it does not care
              of
              > > the mime content you set up (I guess you made it). It only cares of the
              > > extension of the file it ties to read. In your case, I guess there is no
              > > extension because you're using a servlet. To look for the extension, it
              > > search the last dot in the URL, and it may have a problem it the URL is
              > too
              > > long (buffer overflow...).
              > > So you can map your servlet to an url which has a dot in its name, and
              > make
              > > the URL length smaller.
              > > I can't remember the IE bug #id but, it is official at MS.
              > > I hope this will help you.
              > >
              > > dom
              > >
              > > "Rondy Lee" <[email protected]> a écrit dans le message news:
              > > [email protected]...
              > > > Hello
              > > >
              > > > I had a problem opening pdf file at IE through streaming. I create a
              > page
              > > > that have a hyperlink to open the new window and talk to a serlvet.
              When
              > > > clicked, this serlvet will stream a pdf file from the file server to
              > > serlvet
              > > > output stream. And the pdf file will be displayed within the browser.
              > > >
              > > > The problem comes that I can see the Acrobat Reader trailer screen
              > display
              > > > but the brower show nothing. I click refresh button to that serlvet to
              > > > reload then it come up the content.
              > > >
              > > > Is anyone have the same trouble on this and any solution will be
              > > > appreciated.
              > > >
              > > > Rondy Lee
              > > >
              > > > State Street Australia Ltd.
              > > >
              > > >
              > > >
              > > >
              > > >
              > >
              > >
              >
              >
              

  • Problem with opening PDF files from JSF page using SDO

    Hi all,
    I'm new with JSF and was attempting to read a PDF file from a Database using SDO and JSF. The code below throws an exception when casting from DataObject to Blob. The getLcDoc() method was created by WSAD when I dragged an SDO relational record onto the JSF page. This method returns an DataObject type which I tried casting to a Blob type before using it further. However, an exception is thrown.
    Any feedback is appreciated.
    Arv
    try {
                   FacesContext faces = FacesContext.getCurrentInstance();
                   HttpServletResponse response =(HttpServletResponse) faces.getExternalContext().getResponse();
                   Blob file= (Blob)getLcDoc().get("ATTACH");
                   int iLength = (int)(file.length());
                   response.setHeader("Content-type", "application/pdf");
                   response.setHeader("Content-Disposition", "inline; filename=Attachment");
                   response.setHeader("Expires","0");
                   response.setHeader("Cache-Control","must-revalidate, post-check=0, pre-check=0");
                   response.setHeader("Pragma","public");
                   response.setContentLength(iLength);
                   ServletOutputStream os = response.getOutputStream();
                   InputStream in = null;
                   in = file.getBinaryStream();
                   byte buff[] = new byte[1024];
                   while (true) {
                   int i = in.read(buff);
                   if (i<0) break;
                   os.write(buff,0,i);
                   os.flush();
                   os.close();
         } catch(Exception ex){
              System.out.println("Error while reading file : " + ex.getMessage());
         }

    Hi...I found out that there is actually no need to use a Blob object at all. You can simply call the OutputStreams write() method and pass the DataObject.getBytes() method that returns a byte[] array. The revised code is shown at the end of this posting.
    However, a few other teething problems exist:
    1. This works well only if I specify the content type in response.setHeader() method. What if my users upload different types of files, is there a way that the browser opens according to the file type without setting the content type?
    2. I still have a problem opening PDF files, even if I specify - response.setHeader("Content-type", "application/pdf");
    I get the message - The file is damaged and could not be repaired
    3. I would also like this to open the attachment in a new window and using target="_blank" doesn't seem to work as seen below:
    <h:commandLink
                                                 styleClass="commandLink" id="link1" action="#{pc_DocumentDetailsRead.doLink1Action}" target="_blank">
                                                 <h:outputText id="text5" styleClass="outputText"
                                                      value="Click Here"></h:outputText>
                                            </h:commandLink>
    ------------------------Revised code-----------------------------------------
    FacesContext faces = FacesContext.getCurrentInstance();
                   HttpServletResponse response =(HttpServletResponse) faces.getExternalContext().getResponse();
                   response.setHeader("Content-type", "application/msword");
                   response.setHeader("Content-Disposition", "inline; filename=Attachment");
                   response.setHeader("Expires","0");
                   response.setHeader("Cache-Control","must-revalidate, post-check=0, pre-check=0");
                   response.setHeader("Pragma","public");
                   ServletOutputStream os = response.getOutputStream();
                   os.write(getLcDoc().getBytes("ATTACH"));
                   os.flush();
                   os.close();

  • Adobe Reader 10 problem with opening pdf files

    Ever since I downloaded and installed Adobe Reader 10, I have been unable to open .pdf files from the Internet.  When
    I try to download them, I only the get the option of saving the file, not opening it.  Any help would be appreciated.  Thanks!

    We had similar problems with both the upgrade to 9.4.2 and 10.0.1. We would either get the download/save screen or a black screen would appear and eventually error out and freeze up the machine when we tried to hit pages that loaded pdfs stored in Oracle.  We found the pdfs would load when using Chrome or Firefox.
    We're running winXP SP3 and mainly have users using IE 7 and IE 8.  We were eventually able to solve the problem by doing the following:
    Implementing the code fix outlined in this thread (Response.charset = null;) in the page that pulled pdfs from Oracle: http://forums.adobe.com/message/3476821
    Uninstalling and reinstalling the base version of Reader (9.4.0 or X.0) from users' machines that had gone through the update from 9.x to X.x
    Rebooting the machine after each uninstall or install
    Updating the Reader to either 9.4.2 or 10.0.1
    Now we have users who can successfully load the pdfs from Oracle who are running either 9.4.2 or 10.0.1.
    Hope this helps!

  • I have a problem with opening PDF files downloaded from anywhere!

    I can view them ok in Safari, but when I save and download them, they are displayed with the Preview image and will not open.
    When I click them, a message says that 'the file may be damaged or not recognised by Preview'.
    I have cleaned up my computer (apple help ) but still, the problem remains. I downloaded the same file to my MacBook pro, and it saved it in the usual PDF format, (completely different image from above), and opened perfectly well.
    I have checked the settings in Preview and they seem to be set correctly so that Preview will open PDF files.
    What next?
    I am desperate!
    Jennifer

    See if you can delete any Adobe PDF plugins from /Library/Internet Plug-Ins/. Then quit and re-open your web browser and try again.

  • Upgrade to Netweaver causing problem while opening pdf file in the portal

    After an upgrade to Netweaver 4.0, the following code for opening a pdf file constructed from a byte stream passed from an RFC fails.
    Document doc = new Document(PageSize.A4);
    javax.servlet.http.HttpServletResponse myResponse = request.getServletResponse(true);
    myResponse.setHeader("Content-Disposition","attachment;filename=\"AIPDoc.pdf\"");
    myResponse.setContentType("application/pdf");
    ByteArrayOutputStream baosPdf = new ByteArrayOutputStream();
    OutputStream os = myResponse.getOutputStream();
    os.write(pdfResult);
    PdfWriter.getInstance(doc, os);
    It throws a "file not found error" on opening directly. However, if saved and viewed; it opens fine. I believe we need to specify the portal url in the filename but not sure.
    Thanks,
    Devina

    Hi Devina,
    We are also opening a pdf file constructed from a byte stream passed from an RFC.  Our problem is that we are experiencing inconsistent results.  The file appears to open on some PC workstations but not on others.  When it doesn't work we simply get a blank screen in the window.  Did you resolve your issue?  If so, perhaps you can provide us with some suggestions for solving our problem.
    Thank you,
    Angie

  • Problem with opening pdf files in Explorer

    I'm trying to use a button to open a pdf file. It's always
    worked in the past, but now I'm receiving an "object error" and the
    pdf is not loading. Does anyone know if this is a problem with the
    new version of Internet Explorer? Any work arounds?
    Here's my code:
    on (release) {
    getURL("NameofDoc.pdf", "_blank");
    }

    Hi,
    1. It's Adobe Reader XI, ver 11.0.08
    I guess the version of the plug-in corresponds with the version of the reader itself?
    2. "Page cannot be displayed", mostly
    Some say it takes a while for the (small) pdf to open, but we could no recreate this behavior yet.

  • Does anyone have a problem with opening PDF files in iBook after updating the program recently

    I need to try to open the pdf file a few times before it goes in iBook.
    It is making me look like a fool cos I use iBook for my presentation to my clients

    I'm presumably having a similar problem with pdf's in ibook.  It seemed to work fine until about two updates ago.  We're using ipad II's with ibook (latest version as of today) for our board of director's reports.  These are sometimes several hundred pages and password protected pdf's.  Now the more whiney members of the board are *******' at me, so I need to find a solution relatively quickly.  Is there a way to back off the updates?
    What it does.
    When a PDF is chosen to open from the library, ibook open a "blank" file -- showing only the ibook background.
    One can try closing and re-opening the PDF and after three or four times it'll open -- seems to be random.
    These PDFs are created in Adobe Acrobat 9.

  • Facing problems to open PDF files in iBooks in my Mac, how can I fix it?

    I didn't use to have problems opening and reading my PDF files in iBooks.
    However, yesterday my MacBookPro started not to open any PDF files.
    Its books, the app would open normally, but PDF files it just blinks the apps at the bottom of its screen but do not open any file.

    Hello,
    I guess my question here is why would PDF's open in Preview and not in iBooks? What is the point of adding them to iBooks if it just route them elsewhere?
    Thanks,
    Robert

  • HT5568 problems with opening PDF files on safari

    in Safari i am not able to view pdf pages when i open link through wed pages, i have to first save it to my desktop and then open to see the pdf files. I have another macbook where i do not have this problem. any solution to this would be great help

    If you want to open a PDF file within Safari, you have two choices. You need to place either item 1 or items 2 in your /Library/Internet Plug-Ins folder.
    Apple Quartz Composer.webplugin
    Adobe Acrobat Reader 11 PDFViewer.plugin and AdobePDFViwerNPAPI.plugin
    Your actions are, again either item 1 or item 2:
    Get a copy of the Apple Quartz Composer webplugin from someone else with the same exact OS X version as you (or reinstall OS X).
    Place in /Library/Internet Plug-Ins
    Permission: 755 root:wheel
    Download and install the latest Adobe Acrobat Reader 11 version for OS XThe installation will place the above Adobe PDF plugins in /Library/Internet Plug-Ins
    If the Apple and Adobe plug-ins co-reside, the Adobe PDF plug-in will overide the Apple Quartz Composer plugin.
    The Adobe PDF viewer has more functionality and is compatible with the latest Safari 6 releases.

  • Problem with open PDF files

    update I did, as you've mentioned, and now it works - let's say in 95%  When I receive an e-mail with PDF, I hit "save", and right away I cannot open the file. However, when I will go back to e-mails list, and wiev once again the same e-mail, I can see the PDF directly from the level of mail. Bit strange, however big improvement comparing to the former situation. Perhaps there is some kind of bug in stock e-mail app?

    Hi, I have following problem with my Xperia Z3:- when I receive the e-mail with PDF as attachement, I can just save it, but cannot open it. It says: "you have no application installed, please install one.."- when I save the file, and open it from File Manager, I can easily open it with Acrobat, Foxit or any other. There's no problem- when I try to do the same directly from "Downloaded" apps, again I cannot open it As I receive some part of e-mails with PDF's, the best way would be to open them directly after saving from e-mail client. Saving them, and then going to File Manager to open makes it more complicated.  Do you know, what can be the problem here? It concern stock e-mail client, Android 5.0 Hope you may know some solution

  • Problem in opening PDF files using Reader 8 when created with iText 2.1.3

    We are facing problem in using IText version 2.1.3. We are using Acrobat Reader 8.1 for viewing the PDF documents. In our Shell program we are splitting and merging the pdf documents using IText. The pdf document works correctly and is readable for documents with one page while it fails for documents with multiple pages.Also please note that it works fine with the older Arcobat reader version say version 7.0 and below but since business has migrated to acrobat higher version we expect IText to work in sync.
    We have already raised a bug with the iText and got the information from them stating that the problem is due to the over nesting of XObjects, which has a threshold value of 50 and was discarded in earlier versions but got flagged in Acrobad Reader 8. Also note that we have reported a bug with the adobe development team.
    We tried working with other Java PDF tools (jPDFProces), to manupulate the pdf files but were facing the same problem. Hence we understand that the problem is with Adobe Reader 8 as the manupulated pages are being viewed in Adobe Reader 7, but fails to read in Adobe Reader 8.
    Kindly provide us with a solution.
    Thanks and Regards,
    Kiran R
    Sonata software.com
    www.sonata-software.com

    Conte Pietro
    [email protected]
    Buon Giorno
    Ho un problema riguardo Adobe Reader.
    La vecchia versione Adobe 8.1.1 non mi apre più i files in formato PDF.
    Ho provato ad installare l'ultima versione Adobe 9 , arriva fino ad un passo dal completamento ma non riesce a terminare. mi da il seguente errore:
    ERROR 1714 The older version of Adobe Reader 9 cannot be removed.
    Contattare l'assistenza!
    Ho cancellato tutti i riferimenti Adobe dal DeskTop, dal Pannello di Controllo e dal FILES Programmi, ma niente!
    Vi sarei grato se potete mandarmi un dettagliato help per riuscire a completare l'installazione.
    Grazie
    [email protected]
    [email protected]

  • Problem of opening PDF files on the web

    I have installed the latest version of Acrobat Reader, but I still couldn't read some PDF files on the web, what should i do?

    Hi wings57638543,
    1. Which browser are you using?
    2. Are there some specific files that you are unable to load in the browser? Can you share the link?
    3. In Reader DC, go to Edit->Preferences->General and click on "Select As Default PDF Handler" button. Then try loading those PDFs.
    Thanks.

Maybe you are looking for

  • Printers suddenly lose wireless connection often

    I have two HP printers in my house, a Photosmart 6520 and 5520.  They were both working just fine for a year at least, and I've had other HP printers in the past that I used wirelessly with no issues. Within the last month, I've been having major iss

  • Problems with Acer VGA/RJ45 adapter

    Hi All,  I am new to this community. I have had an Acer Asire V5-571P for a year or so now and am frustrated by the internet connection port. The laptop came with an adaptor which has a VGA and a Cat5 connector. This has worked fine for most of the t

  • HELP! What can I do?

    this crack came out of nowhere today: http://i34.tinypic.com/34gx3i9.jpg http://i35.tinypic.com/n1w0m8.jpg **these pictures arent mine** i did a quick google search to see if any macbook users experienced this same problem, and these pictures came up

  • Query correction

    hi..good evening... i have with sale_order as (         select 25 sd_code, 'P01045645' sd_prod_code, 10 sd_qty from dual union all         select 25,'P01400025'  ,  35 from dual union all         select 25,'P01033691.3',  40 from dual union all      

  • Oracle Access Manager, ADAM & Oracle ECM - UCM integration?

    I`m currently investigating the potential of using Oracle Access Manager (OAM) as a tool that allows connections to multiple Active Directory(AD) or ADAM servers providing a single point to author and manage users with a good easy to use GUI. The UCM