How to invoke a pdf from the java  stand alone application

I have a JFileChooser and i select a pdf through that . And i should be able to invoke the file in an acrobat reader.
The acrobat application should be invoked on a click the button upon selection.
Thanx in advance.

Try to use Runtime.exec() method like this:
String exePath = "path to acrobat reader executable";
String filePath = "path to the file to execute";
Runtime.getRuntime().exec(exePath+" "+filePath);

Similar Messages

  • Reading data in HTML page from a  Java Stand alone application

    hey,
    i ve read bout how to read html pages using the URL and how to parse them using HTMLeditorkit and stuff.. but i want to read the values tht are updated in the HTML page dynamically and then use them in my java application ... is tht possible .. then i also want to check the click here links and the working of them ...
    please reply ...

    well .. i did tht too ..
    public void handleStartTag(HTML.Tag tag,
       MutableAttributeSet attributes, int position) {
              try{
                   //if (tag==HTML.Tag.A)
                   System.out.println("tagged");
                   this.writeAttributes(attributes);
                   if(tag==HTML.Tag.INPUT)
                   System.out.println("input found");
              catch(IOException ex){
                   System.err.println(ex);
         }the <A> tag thing is working but it is not recognizing the <input> tag ....
    ne ideas why this is not working ...

  • How to call a package from the Report in Oracle Application Express

    How to call a package from the Report in Oracle Application Express

    Hello,
    What do you mean? Something like SELECT mypackage.function( par1, par2) from dual?
    Or do you want to execute a procedure when something happens on the page, like clicking a button?
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Deploying Java stand alone application in Weblogic server

    Hi All,
    We have an java stand alone application which our client uses. Suddenly they came up with a requirement of using this application from web logic server.We have following directory structure for our application
    myapp
    - config -> contains all configuration files
    - logs -> contains log files
    - ssl -> ssl related files
    - samples ->contians stub's
    - myapp.jar
    How to deploy our standalone application in to weblogic server?.
    We tried putting whole myapp folder in WEB-INF folder , and from the servlet we are able to invoke an method in an class file( in myapp.jar say Test.getInstance()) but it couldnt find configuration files (in config folder ) and it is throwing an error. We have a class called Test in myapp.jar and when we call getInstance of the class it loads all config files - config file location is hardcoded as /config/myconfig.xml , and we are facing problem here because it couldnt find myconfig.xml.
    We also tried packaging whole myapp folder in to jar , but with that also we faced the same problem
    Please let us know are we proceeding in the right way and how to deploy our application in weblogic server.We dont prefer making changes to our code at this point of time.
    Any info on this will be very helpful to us.
    Regards,
    Suresh

    Hi René van Wijk,
    Thanks for quick reply. Link you mentioned gave a basic idea of application structure , but still i couldnt get deployment process.
    Am very much new to weblogic.Can you please let me know how to deploy our standalone application in to weblogic, with out making any changes to the code.
    Below is folder structure of my java stand alone application *( not webapplication)*
    myapp
    - config -> contains all configuration files , for ex:- myconfig.xml
    - logs -> contains log files
    - ssl -> ssl related files
    - samples ->contians stub's
    - myapp.jar
    We have logic to load configuration file (config/myconfig.xml) , in an class and we are not allowed to make any changes to this code, so we cant use Thread.currentThread().getContextClassLoader().getResource(...) .
    Regards,
    Suresh

  • How do you email pdf from the print screen

    Anyone found a way to email a pdf from the print screen?
    Thanks

    Previous screen of what?   You need to be more specific.

  • How to register a dll from the java code

    Hi,
    We can use windows utility Regsv32.exe to register a the components. Is it possible to register the Dll from the java code. If possible please try to provide me the code for the registring the dll.
    Thanks in adavance
    Aswad

    if a try this variant it doesnt work
    static {
            System.loadLibrary("shellExec.dll");
    but in this way it work (without .dll extension)
    static {
            System.loadLibrary("shellExec");
    }

  • How to execute unix command from the Java program running on Windows

    Hello,
    I need to
    1. Execute a unix shell script from a Java program running on the Windows.
    2. I also need to capture the output of this shell script in my program.
    Please suggest me how to achieve this.
    Thanks in Advance.

    Hi...
    Something is missing here
    If you want to execute a shell script in windows that not posible unless you find or develop a unix shell script parser for windows.
    But if you are trying the execute a unix shell script on a remote unix computer from your java program running on a windows platform you can do that by logging on to the UNIX terminal which is running on port 23 I think.
    You can test this using telnet tool on windows
    just type on command prompt
    telnet <ip of the unix pc> <port number this case 23>
    you should get the unix terminal. If that works you can do the same through java or you can directly conect to port 23 of that pc using sockets that way your program will be platform independant

  • How to see "console output" from the java web start ?

    Hi all.
    I wish to see logging infomation from the client side when using java web start technologie (java1.6 version).
    Please help.
    Thak's

    Use the "Advanced" tab of the Java Control Panel to turn on "tracing" and/or the Java Console.
    see:
    http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/troubleshooting.03.06.html
    /Andy

  • Installing Java Stand alone Application on other PCs

    Dear All
    I am very new user to Java programming. I have recently finished developing basic Java Application that interacts with MySQL Database. The application does pretty standard database tranctions.
    Now i would like to install this finished appliction on other PCs as stand alone program (hope i am making myself clear here). Sort of I need to make an installation package that will install the Basic application and MySQL database on the the other PCS.
    Please desparetly help needed on this matter. I appreciate all your inputs Thank you.

    it would be much much easier if you weren't using MySQL to be honest. if you used a pure-java database such as Hypersonic, the database could just be bun dled as a bean with your application.

  • How to invoke a servlet from the command line

    Hi,
    I have a process that needs to do something remotely. One of the ideas is to have a servlet on the other side that can do that. So the question is how can I invoke it from my process?
    Thanks,

    First approximation to code:URL remoteTask = new URL("http://yourserver.org/yourservlet");
    InputStream response = remoteTask.openStream();
    // read the servlet's response from that InputStreamYou will find more comprehensive versions of this code if you search the forum.

  • How to execute *.BAT file from  the Java Application

    Hello to all.
    I wants to run *.BAT file form my applicaion.
    Can u give the code of that two-four line,please
    Wating four your replay.
    Yours Friend
    Bhavin Shah.....

    pr = rt.exec("cmd.exe /c start " + yourProgramName)The exec() method executes the command you specify in the argument and returns a process. In this example, it's telling Windows to run "yourProgramName".
    HTH

  • How to deploy java stand alone applications

    I need to find information on how to deploy java classes to just run time clients.
    I appretiate any help on this.

    Probably yes. It is possible to write a lunch application. But what considerations do I have to take. Let's say, Since Forte for Java 4 does not use CLASSPATH environment variable, How do I tell the JRE where my classes are located? I tried running
    javaw c:\directory\classname.class
    ...but I receive a message saying that the main class was not found...
    Do you know why this could be?

  • How to create a pdf for the URL attached to an invoice and send it as an attachment in a mail

    HI,
    I have requirement where i need to get the URL attached to an invoice, create the pdf and send as an attachement in a mail.
    The URL attached to an invoice can be seen by following the path : VF03-> Billing document->system->Services for object ->Attachement list.
    On searching through existing forums, i found that there is a table 'SRGBTBREL' which stores relationships of GOS object. On giving the invoice number in field 'INSTID_A', i could find an entry in this table.
    To get the content, i used the class CL_FITV_GOS, method GET_CONTENT. To this method i passed following values:
    IV_ATTA_ID = FOL21000000000521URL39000000000012 (The value if field INSTID_B from table SRGBTBREL)
    IV_OBJTP   = 'URL'
    On execution, i get URL link but the content table is empty.
    Could anybody provide some input on how i get the content? Or may be how i can create pdf from the URL link and attach it to mail as an attachment?
    Thanks,

    Hi Amit,
    Solution provided by you is working when the link length is one line but it is not working for more than one line
    Eg: say link is https://......80 [80 characters long]
    I will give    <a href="https://...72            [in first line]
                     73..80">click here</a>         [in second line]
    I will get the output as 73...80">click here
    But i want only CLICK HERE in my output..
    Please suggest solution.
    Thanks,
    Kavya

  • How to invoke BPEL process from JAVA API

    Hi Guys
    Any idea if you can tell me how to invoke BPEL process from JAVA API ?
    What to do in BPEL process manager to achieve that?
    Regards
    Deepak

    See http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28981/invoke.htm#sthref1373 and the JavaDocs http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28986/toc.htm.

  • How do I scan multiple documents to a single pdf from the ADF on my MX922?

    How do I scan multiple documents to a single pdf from the ADF on my MX922?
    Solved!
    Go to Solution.

    Hi Riceburner1,
    Since you have had difficulty scanning using My Image Garden, you can scan using the IJ Scan Utility program that also comes with the printer.  To do this, please follow these steps:
    1. Place the documents in the ADF or on the platen glass of the printer.
    2. Start the IJ Scan Utility.
        For Windows 8.1:
        1. On your keyboard, press the Windows key.
        2. Start typing IJ SCAN UTILITY. The search window opens as you type. Once the IJ SCAN UTILITY is displayed, please select and open it, then continue with Step 3 below.
        For Windows XP:
        1. Go to your START MENU, then select ALL PROGRAMS, then CANON UTILITIES, then the IJ SCAN UTILITY program.
        2. In the Canon IJ Scan Utility window that opens, click SETTINGS.... in the bottom right of the window. The Settings dialog box appears. Please continue with Step 3 below.
    3. In the Canon IJ Scan Utility window that opens, click SETTINGS.... in the bottom right of the window. The Settings dialog box appears.
    4. Click the DOCUMENT SCAN option on the left pane of the window. In the Select Source field of the Scan Options section, select DOCUMENT (ADF/PLATEN) to scan items placed directly on the platen glass, DOCUMENT (ADF SIMPLEX) to perform single-sided scanning from the ADF, or DOCUMENT (ADF DUPLEX) to perform double-sided scanning using the ADF. You can then set the item size, resolution, etc. in the Scan Options section as desired.
    5. In the SAVE SETTINGS section of the window, you will select the save format and location of the document you are about to scan.
         a.) In the FILE NAME field, specify the name you would like to give the file. By default the filename will begin with IMG; you can remove IMG and change it to whatever you would like to name the file.  Please note that the filename that you give the document here will be the default filename for all items scanned until you change the file name.  If you leave the file name the same in the field, the scanned item will have a sequential number appended to the end of whatever name you give it.
         b.) In the DATA FORMAT field, use the drop-down arrow to select the desired option. If you are scanning a multipage document, select the PDF (Multiple Pages) option.
         c.) In the SAVE IN field, please navigate to the area where you would like the file to be saved once it is scanned in. By default, the file will be saved in the MY DOCUMENTS folder.
    6.  In the APPLICATION SETTINGS section of the window, please select the DO NOT START ANY APPLICATION option.  
    7. Once all settings have been selected, click the OK button at the bottom of the SETTINGS (DOCUMENT SCAN) window. The IJ Scan Utility main screen appears.
    8. Click the DOCUMENT button. Scanning starts. Click the CANCEL button to cancel scanning if needed.   Once the scan is completed, scanned images are saved in the previously selected folder location specified in the SETTINGS... window.
    Hope this helps!
    This didn't answer your question or issue? Please call or email us using one of the methods on the Contact Us page for further assistance.
    Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well.

Maybe you are looking for