java runtime.exec, is this possible?

Discussion in 'Java' started by BigCohunes@gmail.com, Sep 17, 2006.

  1. Guest

    I would like my java app to launch an external program. The external
    program is the Windows Command Processor (cmd.exe).

    I would like my java app to launch it as it's own separate process. So
    I would like a new window to appear, with the prompt showing. I can't
    figure out how to have my app launch the cmd window such that i can
    physically see it. (i do see it in my process manager, but no gui for
    it?)

    I can't seem to figure this out. Is it possible to have my java app
    launch the cmd.exe, then have the java app exit, but leave me with the
    new window that came up when my app launched cmd.exe.

    Any idea's?

    Thanks
     
    , Sep 17, 2006
    #1
    1. Advertisements

  2. wrote:
    > I would like my java app to launch an external program. The external
    > program is the Windows Command Processor (cmd.exe).
    >
    > I would like my java app to launch it as it's own separate process. So
    > I would like a new window to appear, with the prompt showing. I can't
    > figure out how to have my app launch the cmd window such that i can
    > physically see it. (i do see it in my process manager, but no gui for
    > it?)
    >
    > I can't seem to figure this out. Is it possible to have my java app
    > launch the cmd.exe, then have the java app exit, but leave me with the
    > new window that came up when my app launched cmd.exe.
    >
    > Any idea's?
    >
    > Thanks
    >


    START

    --

    Knute Johnson
    email s/nospam/knute/
     
    Knute Johnson, Sep 17, 2006
    #2
    1. Advertisements

  3. Try "cmd.exe /C app".
    Type "help cmd" for more info.

    Regards,
    RZR
     
    Rodrigo Zechin, Sep 18, 2006
    #3
  4. Guest

    Knute Johnson wrote:
    > wrote:
    > > I would like my java app to launch an external program. The external
    > > program is the Windows Command Processor (cmd.exe).
    > >
    > > I would like my java app to launch it as it's own separate process. So
    > > I would like a new window to appear, with the prompt showing. I can't
    > > figure out how to have my app launch the cmd window such that i can
    > > physically see it. (i do see it in my process manager, but no gui for
    > > it?)
    > >
    > > I can't seem to figure this out. Is it possible to have my java app
    > > launch the cmd.exe, then have the java app exit, but leave me with the
    > > new window that came up when my app launched cmd.exe.
    > >
    > > Any idea's?
    > >
    > > Thanks
    > >

    >
    > START
    >
    > --
    >
    > Knute Johnson
    > email s/nospam/knute/




    using "start" solved my problem!

    String cmd[] = {"cmd", "/C", "start", startPath, arg};


    Thanks,

    -Mike
     
    , Sep 18, 2006
    #4
    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. Charlie Zhang
    Replies:
    5
    Views:
    6,715
    Qu├ębec
    Jun 19, 2004
  2. Jakir
    Replies:
    4
    Views:
    3,438
    Jakir
    Sep 1, 2004
  3. Dave
    Replies:
    2
    Views:
    674
    Tony Morris
    Oct 2, 2004
  4. Darren
    Replies:
    10
    Views:
    1,968
    Darren
    Nov 15, 2005
  5. seenuvas
    Replies:
    7
    Views:
    2,826
    Roedy Green
    Jan 24, 2006
  6. seenuvas
    Replies:
    0
    Views:
    620
    seenuvas
    Jan 24, 2006
  7. Hal Vaughan
    Replies:
    11
    Views:
    1,483
    Gordon Beaton
    May 22, 2006
  8. Replies:
    4
    Views:
    3,608
    Robert Mark Bram
    Oct 31, 2006
Loading...