Opening a PDF file from a swing application in MAC

HI everyone,
Actually I am developing a swing application which should be executable in both windows and Mac (even other) platformes. In my panel I have an icon which leads to a pdf file. I saw in the following thread:
http://forum.java.sun.com/thread.jspa?forumID=17&threadID=617767
that we can use
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + file);to open what ever file in windows. I want to know what should I do if this application is running on Mac or Linux! I have never worked with these OS so I do not have any idea how to resolve the problem.
Can anyone help me with this matter?? That would be really nice of you to reply :)
Thanx and have a great day.

Thank you for replaying so soon..
Well you are right by using a widget and etc.. but the problem is that I have been told that this application should open a PDF file that has bookmarks to each chapter of the text and one can make a search on this text by using pdf search.. So I do not have any other choice than opening a pdf :D and my time is unfortunately limit.
For solving the problem that the user may not have PDF reader.. well I have been told that user should install the pdf reader, so in my application package I am putting the installation file of PDF.
But going back to my problem.. I guess is someway I have to get the OS type of the user and I have to do a SWITCH or something on the OS type and then change the content of the Runtime.exec(). But the question is how can I get the OS type and what should I change in Runtime.exec().
So now any idea? any solution??

Similar Messages

  • Viewing and printing a PDF file from Java Swing Application

    Hello,
    I need to view and print PDF files from Java Swing Application.How do I do that?I appreciate your help.
    Thank you
    Sumana Somareddy

    If you have a link to the URL pointing to the PDF file, you can allow the browser to open it. Then use the print function of the browser to print the PDF document.
    Regards,
    Tak.

  • How to open an PDF file from Java Application

    Hi
    I am developing a GUI application in java swing.
    on clicking one button, I want to open PDF file from my swing application.
    Is there any API through which I can achieve this?
    Tapan Maru
    Sun Certified Java Programmer

    Here's a way to do it (if I understand you
    correctly). Just let explorer.exe do it for you.
    import java.awt.*;
    public class openPDF
         Desktop desktop = Desktop.getDesktop();
         public openPDF()
              open("test.pdf");
         public void open(String path)
              try
                   Runtime.getRuntime().exec("explorer.exe "+path);
    } catch(Exception e) { System.out.println("NAI!
    I! ERROR!\n"+e); }
         public static void main(String[] args)
              openPDF myApplication = new openPDF();
    Why do you have a Desktop object as a member but instead of using it, you execute a command with Runtime (which is not platform independent!)???
    -Puce

  • How do I get Adobe Acorbat to open a .pdf file from a sharepoint library without having to checkout the file

    I have a customer that is using Adobe Acrobat pro version 10.1. When they try and open a .pdf file from a SharePoint site, the user is prompted to check out and open the file or open the file. Is there a way to get Adobe Acrobat to open the .pdf file without prompting to check out or open?
    Thanks
    Jim

    This is mostly a lion thing, rather than a PSE thing. To disable applications opening where they left off last time for all the programs on your computer, go to system preferences>general and untick this box:
    You can also do on a per-program basis, but it's more complicated and the best thing to do is to search around for directions on the web and see which way is least uncomfortable for you.
    There's an odd little glitch in PSE that it opens the last image you had open, even if you closed it before quitting last time. Adobe says this is correct behavior, but of course it isn't.

  • Can't open web pdf files from my Reader DC because my IMac wants a completed license agreement to use Reader and I never saw that page during installation.

    Can't open web pdf files from my newly installed Reader DC because my IMac wants a completed license to use agreement to Reader, and I never saw that page during installation.  How do I get past this?

    You need to accept the EULA on first launch of the Reader DC application.
    Go to the Applications folder and launch Adobe Acrobat Reader DC. 
    This will bring up the EULA.
    Select the "Agree" button if you agree with the terms
    Assuming you selected the "Agree" button, Reader DC should open.
    You should now be able to open PDF files in your web browser.

  • Unable to open large PDF file from the Attachment list.

    Hi Gurus,
    Users had attached 10 PDF file in the work order attachment list and his supervisor is trying to open the PDF file from the work order attachment list and he is able to open 9 PDF files without any issue, but 1 PDF file is giving the error message as "Database error for <GET DATA FROM KPRO>" and then select ok, we are getting the below message.
    Window cannot find u201CC/Documents and Settings/b2m/SaoworkDir/5015851 Vendor data sheets B&P 2010 SDown XXX .PDFu2019. Make sure you typed the name correctly, and then try again. To search for a file, click the start button, and then click serch.
    Looks like this particular file is not transferring to the SAP work directory.
    Could you please check and suggest us as to how to fix it.
    Thanks & Regards,
    Srivas

    Hi,
    Thanks for your reply.
    We verified  your OSS notes it's not relevant to us Because our issue is while opening the PDF aatchement it is not transferring to my SAP Work Directory because of that reason we are getting the KPRO error. When I'm opening the other PDF files it's transferring to my SAP Work Directory and it's automatically open without any issue.
    Please check and suggest.
    Thanks,
    Srivas

  • I cannot view PDF in Firefox at the first time but once I manually open the PDF file from my local computer, I can view other PDF files via Firefox webbrowser

    I install Adobe Acrobat 9 in my laptop which runs on windows 7. I use Firefox 3.6.8 and have the problem with the PDF file. The problem is I cannot open the PDF file in Firefox web browser at the first time I launch firefox. It shows a warning box without any message. Only OK button is shown so I can close it. However, if I manage to open the PDF file from my local computer by just using adobe acrobat itself then the PDF can be opened in the Firefox web browser. I followed the instruction on the mozilla help but nothing works for me. The problem still exists. I wonder if anyone have the same problem like me and know how to solve this. Thank you so much

    Hi there!
    I cannot help you, but I think we have a common problem: We got a system here running Vista SP1 with Acrobat 9 standard on it. When we open a pdf file it works normally, but when we open another pdf file, we see the first one in that second window.
    Think that missing option to watch several files within a single window-thing messed up more than meets the eye ... but as we just purchased the 15 licenses, we have to use version 9.
    I didn't find any clues on this problem, but I will post any new hints I get.

  • Opening a pdf file from the internet.

    Everytime I try to open a pdf file from the internet a window pops up and tells me that my adobe reader has a problem or gives me a blank page.  I have ie 10, adobe reader XI and adobe acrobat 8 pro.  All this is on win 7.  When I installed the acrobat 8 pro it could not find the adobepdf.dll.  I searched the disc, and tried to direct the installation to it but it would not accept it.  What can I do to correct this issue?

    Yes, unlike earlier IE versions, IE10 has only one executable, but it can run in 32-bit or 64-bit mode.
    Some details: http://www.sevenforums.com/tutorials/280434-internet-explorer-10-enable-32-bit-64-bit-ie10 -windows-7-a.html

  • Opening a PPT file from a Web Application

    Hi,
    I want to open a PPT file from my web application.
    I have provided an hyperlink of the complete path of the file. Once the user clicks on this hyperlink the PPT shall open.
    Kindly help me out with this.
    Thanks.

    Sounds like you're done. What happens when the user clicks the link?

  • Why cant I open a PDF file from a cd-r that I burned into this cd myself at work on my personal laptop? I have the same version of Adobe.

    Why cant I open a PDF file from a cd-r that I burned into this cd myself at work on my personal laptop? I have the same version of Adobe.

    What happens when you try? Have you saved to your computer and then tried to open it?

  • Open the pdf file from forms6i

    Hi,
    how to open the pdf file from forms6i.
    can anyone help me regarding this.
    Thanks,
    Ansaf.

    Hi,
    The HOST built-in does not return any error or message back to the Form.
    You will have to use some other means to first find out whether the file exists or not. E.g. you could use TEXT_IO.FOPEN to open the file in Read mode. If the files is not found the handle returned will be null, and that will be condition you have to process to show a message or pop an alert.
    Make sure you close the file with FCLOSE, irrespective of whether the file is found or not, before you open the File for viewing.
    Regards,

  • How to move PDF file from Spool to Application Server?

    How to move PDF file from Spool to Application Server?
    Cannot use RSTXPDFT4 because that converts OTF to PDF and the file is already PDF.
    RSTXPDFT5 doesn't work. It picks the file up and assigns it a 'text' type and outputs a 1 line txt (1kb in size) on the server with the spool number in it!
    The program which outputs the file to the spool, in the first place, uses adobe forms and outputs to a printer of type PDF.

    Hi Gemini ,
    Please refer the below links.
    [http://sap.ittoolbox.com/groups/technical-functional/sap-hr/convert-a-spool-to-pdf-and-save-on-application-server-in-background-720959]
    [http://www.sapfans.com/forums/viewtopic.php?f=13&t=325628&start=15]
    Edited by: Prasath Arivazhagan on Apr 13, 2010 4:48 PM

  • Issues with printing PDF files from an ADOBE application

    When printing PDF files from an Adobe application, some of the characters are lost and do not print. What can I do?

    Please don't post the same question multiple times!

  • What is the best way to use wi-fi to transfer pdf files from an ipad to a mac mini, not using an internet, just wi-fi.

    What is the best way to use wi-fi to transfer pdf files from an ipad to a mac mini, not using an internet, just wi-fi?

    If the Mac use Lion (10.7) you can use Airdrop for that.
    With Mac's not using Lion you may set up a computer to computer (ad hoc) connection.
    How to --> http://docs.info.apple.com/article.html?path=Mac/10.6/en/8339.html
    Lupunus

  • Open a PDF File from a SSRS Report

    I have a requirement to include a link of some sort on SSRS reports that opens a PDF file.  If this were being implemented in an Access report, a click event using the Application.FollowHyperlink method will do the trick.  Is there an analogous
    method to accomplish this on a SSRS report, please?

    Thanks to Bipin.P !  Although I do not yet have the product installed with which to work, I found the following in the RDL specs.  So, if SSRS functionality is identical to that of an IsHyperlink textbox, our requirement will be satisfied
    easily. 
    Thanks again to all!
    From the SQL Server Reporting Services RDL (Report Definition Language) Specification document, page 41:
    Action
    The Action element defines a hyperlink, bookmark link or drillthrough action associated with a ReportItem.
    Name
    Type
    Description
    Hyperlink
    Expression (URL)
    An expression that evaluates to the URL of the hyperlink (18)
    (18) The Access IsHyperlink property of Textboxes will be supported via this more general mechanism. The Hyperlink property of the Textbox can be set to the same expression as
    the Value property of the Textbox.
    Implemented on an Access Report on 05/06/2010:
    Set the IsHyperlink property of a Textbox to Yes              
    Set the Value property of the Textbox to =”Open PDF File#C:\UPDATES\HelpFiles\UIU Boot Menu.pdf”

Maybe you are looking for

  • Importing video from Sony HDR-CX410 FCP 6.0.6 will not recognise AVCHD files. what is the solution?

    First I have to admit I'm not technical in any way so I'm easily confused so please forgive me if my question sounds unprofessional. The computer is a Mac desk top tower with Lion OS x 2x2.66 GHz Dual-Core Intel Xeon with an  internal hard drive plus

  • Tab Page visible property node not working correctly

    I am making a vi in which we have a tab control with 6 pages and to move from one page to another there is ring control with option for every page on page 1( page 1 is the default page), at a time only one page is visible so we can move only through

  • Where do i add a new email alias?

    I can no longer find where i set up a new alias email address for my iCloud account. I have found "alternate" email addresses but this doesn't accept anything i try to add as an alias so I'm guessing its not that.. This USED to be easy.. Any ideas? T

  • Handling button events in large app

    I'm currently examining a large swing app, and have observed the following with regard to action events. A number of listeners (for buttons, menu items, JLists etc.) are defined at the top of the app. These variously extend MouseAdapter or implement

  • IS Retail : Transaction MM43

    Hi folks, is it right that transaction <b>MM43</b> is only executable in a SAP <b>IS Retail</b> system and not in SAP Standard systems? Could anyone confirm this? I got the error message 'Retail materials cannot be maintained in the industry system'