Invoking Windows apps from file type

Discussion in 'Java' started by Ike, Aug 14, 2003.

  1. Ike

    Ike Guest

    Oh this is a Windows-specific question I need to solve in Java. Assuming one
    has MS Word on their system, how can I invoke word to come up with a given
    document, when all I know is the document name, and that fact that if the
    person were to double click the document name in Windows, it would invoke
    Word with that document?

    Thanks, Ike
     
    Ike, Aug 14, 2003
    #1
    1. Advertisements

  2. Does something like:

    try {
    Process p = Runtime.getRuntime().exec("cmd /c start c:\\resume.doc");
    p.waitFor();
    } catch (Throwable e) {
    }

    work for you?

    HTH
    sandip

    "Ike" <> wrote in message news:<GHO_a.14363$>...
    > Oh this is a Windows-specific question I need to solve in Java. Assuming one
    > has MS Word on their system, how can I invoke word to come up with a given
    > document, when all I know is the document name, and that fact that if the
    > person were to double click the document name in Windows, it would invoke
    > Word with that document?
    >
    > Thanks, Ike
     
    Sandip Chitale, Aug 14, 2003
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VB Programmer
    Replies:
    1
    Views:
    506
    Axel Dahmen
    Nov 3, 2003
  2. Andreas Jakobik
    Replies:
    3
    Views:
    474
    sanjay manohar
    Dec 9, 2004
  3. aph
    Replies:
    4
    Views:
    608
    Peter Hansen
    Jan 14, 2006
  4. sherif darwish via .NET 247

    Invoking ui type editors outside vs.net

    sherif darwish via .NET 247, May 7, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    168
    sherif darwish via .NET 247
    May 7, 2004
  5. anonymous

    Call windows apps from web apps

    anonymous, Feb 22, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    4
    Views:
    405
    anonymous
    Feb 28, 2005
  6. Richard Choate

    Web enabled apps/Thin client apps

    Richard Choate, Jul 23, 2003, in forum: ASP General
    Replies:
    2
    Views:
    479
    Chris Barber
    Jul 23, 2003
  7. Roberto
    Replies:
    3
    Views:
    466
  8. Replies:
    1
    Views:
    202
    Jan Svitok
    Aug 21, 2006
Loading...