How to execute ".exe" files using java

Hi,
  This is guruvulu,
     I have a problem in executing ".exe" files.For Example InternetExplorer.

Hi,
You can execute .exe files in JAVA using the following code.
Runtime rt1 = Runtime.getRuntime();
Process pc = rt1.exec("someexe.exe");
you can get the output of the executed exe file in
in = pc.getInputStream(); //this returns a InputStream
hope this solves your problem.
regards,
P.Venkat

Similar Messages

  • How to print PDF files using java print API

    Hi,
    I was goign throw lot of discusion and reading lot of forums related to print pdf files using java api. but nothing seems to be working for me. Can any one tell me how to print pdf files using java api.
    Thanks in advance

    Mike,
    Can't seem to get hold of the example described in your reply below. If you could let us have the URL to get then it would be great.
    My GUI application creates a pdf document which I need to print. I want to achieve this using the standard Java class PrinterJob (no 3rd party APIs I'm afraid, commercial restraints etc ..). I had a stab at it using the following code. When executed I get the pretty printer dialog then when I click ok to print, nothing happens!
    boolean showPrintDialog=true;
    PrinterJob printJob = PrinterJob.getPrinterJob ();
    printJob.setJobName ("Contract.pdf");
    try {
    if (showPrintDialog) {
    if (printJob.printDialog()) {
    printJob.print();
    else
    printJob.print ();
    } catch (Exception PrintException) {
                   PrintException.printStackTrace();
    Thank you and a happy new year.
    Cheers,
    Chris

  • How to run .jar on linux & how to create .jar file using java?

    hi, may i know how to run .jar on linux & how to create .jar file using java? Can u provide the steps on doing it.
    thanks in advance.

    Look at the manual page for jar:
    # man jar
    Also you can run them by doing:
    # java -jar Prog.jar

  • How to open/read file using Java in Unix?

    Hi Friends,
    Can you please help me out how to open/read file using java in unix os? I have create one text file in "/home/test.txt" in unix environment. How to open the same file & read using java code?
    - Hiren Modi

    http://java.sun.com/docs/books/tutorial/essential/io/index.html

  • How to uncompress zip files using java program

    hai,
    please give some sample code to decompress the zip file.
    how to uncompress zip files using java program
    thanking you
    arivarasu

    http://developer.java.sun.com/developer/technicalArticles/Programming/PerfTuning/
    Scroll down to 'Compression'

  • How to run .exe files using SAP

    Hi,
    How can I run my .exe files using ABAP/4 language? How can I pass parameters to my executable? Is there any documentation related with my question?
    Thanks.

    Here is how you can run a .exe from your ABAP.  I don't know how you would pass parameters.
    report zrich_0001
           no standard page heading
           line-size 300.
    data:
               ifile_table type table of file_table,
               xfile_table type file_table,
                return type i..
    parameters: p_app type file_table-filename
              default 'C:'.
    at selection-screen on value-request for p_app.
      clear ifile_table.  refresh ifile_table.
      call method cl_gui_frontend_services=>file_open_dialog
       exporting
          window_title       = 'Get App'
          multiselection     = space
       changing
          file_table         = ifile_table
          rc                 = return
       exceptions
          file_open_dialog_failed = 1
          cntl_error              = 2
          error_no_gui            = 3
          others                  = 4.
      read table ifile_table into xfile_table index 1.
      if sy-subrc  = 0.
        p_app = xfile_table.
      endif.
    start-of-selection.
      data: app type string.
      app = p_app.
      call method cl_gui_frontend_services=>execute
        exporting
          application            =  app.
    Regards,
    Rich Heilman

  • How to run exe file using oracles procedure (ASAP) ?

    i am finding difficulties in running an exe file using an oracle procedure.I need this for a pure .NET application

    I want the solution for both,An Oracle stored procedure cannot generally run an executable on the client machine. Stored procedures run on the server and have no access to your client machine. You could potentially do something convoluted like run a web server on the client with an ASP page that called the executable and have the stored procedure make a UTL_HTTP call to the ASP page, but that's generally not an option.
    If the executable is on the server and it's only available as an executable, you could write a Java stored procedure that called out to the command line and invoked the executable (assuming the operating system user running the Oracle database has permission to do so). If the Oracle database is on Windows and you've got 10.2, you may also be able to write a .Net stored procedure that would do the same sort of thing.
    If you can expose the functionality as a DLL, a more elegant solution would be to use an external procedure.
    Justin

  • How to read pdf files using java.io package classes

    Dear All,
    I have a certain requirement that i should read and write PDF files at runtime. With normal java file IO reading is not working. Can any one suggest me how to proceed probably with sample code block
    Thanks in advance.

    hi I also have the pbm. to read pdf file using JAVA
    can any body help meWhy is it so difficult to read the thread you posted in? They say: java.io is pointless, use iText. So why don't you?
    or also I want to read a binary encoded data into
    ascii,
    can anybody give me a hint how to do it.Depends on what you mean with "binary encoding". ASCII's binary encoding, too, basically.

  • Executing exe files from java program

    Hi,
    I need to execute exe files and pass arguments to them from my java code.
    Can you give me guidelines to do that as i haven't done that before.
    Thanks.

    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html
    getRuntime() method.
    exec() method.

  • How to make Exe file of java program

    how we can make the exe file of java programs. that can run independently of particuler JVM. like in VB we can create exe files.
    - early thanks

    Check this out:
    http://search.java.sun.com/search/java/index.jsp?qp=%2B
    orum%3A31&nh=10&qt=create+exe+file+program&col=javaforu
    s

  • How to gzip a file using java

    Friends,
    I want to gzip a file in unix using my java program, can I use Runtime.exec() method and run the gzip command to achieve this ?
    Is there any other way to zip/compress a file using java api ?
    Thanks

    Use [url http://java.sun.com/j2se/1.5.0/docs/api/java/util/zip/GZIPOutputStream.html]java.util.zip.GZIPOutputStream along with [url http://java.sun.com/j2se/1.5.0/docs/api/java/io/FileOutputStream.html]java.io.FileOutputStream

  • How to execute .sql file using ODI

    Hi All,
    I need to execute .sql file using ODI.
    I tried @{path}{file} command in ODI procedure selecting oracle technology.but it is failing.
    Do any one have any other idea to execute .sql file.
    Thanks in advance

    Ohk...I think you can try creating batch file(.bat) if its Windows & call that from ODIOSCommand.
    The bat file should contain scripts which call .sql file using sqlplus  & there you can use @{path}{file} format.
    See if this helps.
    Regards,
    Santy

  • How to load avi files using java ?

    Hi, i need to load avi (movie file) using java. I have usually done with java applet, but the applet just can load image (jpeg, gif)

    All types of data should be downloaded in same way. What is your problem: exception or something else? Post here.

  • How to execute a file using jsp or java

    hi..
    i had a jsp file as front end with start and stop button,
    if i click the start button a file on my pc should execute.
    if stop button is clicked the file should stop execution.
    Any one know how to do this..especially how to run a file in ur system using java..
    Thanks in advance

    thanks for u r quick replies...
    Actually i want to run a file on a client machine
    only...
    Okay.
    for example, a client should execute a file which is
    in another client...
    This is not the same thing as what you just said.
    can u tell me the method to execute the file......java.lang.Runtime.exec

  • How to execute exe file from pl/sql

    How to execute an exe file or an operating system command from pl/sql in oracle 9i.

    If it is part of a pl/sql block, use the java suggestion. If you are not in a blck, you can use the "HOST" command. see
    http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a82950/ch2.htm#1001697

Maybe you are looking for

  • How to restore iTunes library after operating system changed?

    How to restore iTune library after operating system changed on the laptop? The syn is not working because it doesn't recognize the computer.

  • Fremde Stichworte in Adobe Bridge

    Hallo! Ich habe folgendes Problem: Durch einen Crash habe ich die meine Stichwortdatei von Adobe Bridge CS3 leider unwiderruflich verloren. Dies bedeutet, daß Bridge mir meine Stichworte nur anzeigt, wenn ich eine bestimmte Bilddatei aufrufe. Ich muß

  • Problem with ImageProducer/PixelGrabber

    I'm having a problem using PixelGrabber in my applet, that seems to be related to caching. I load an image through plain old Applet.getImage(), track that it's loaded via MediaTracker, then use PixelGrabber to grab the image into an integer array, al

  • Funtion module to delimit infotype 167

    Hello Gurus, Is there any function module to delimit automatically infotype 167 ??? Best Regards Bruno Silva

  • My incoming messages aren't showing

    I'm sorry I'm bothering you, but I have a problem. Skype doesn't show my incoming messages. My laptop's time was wrong (2 days behind) and I fixed it. That's when my problems started. I've followed every step on subjects with similar problems,a and i