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. Advertising

  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. Advertising

  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. Advertising

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,532
    Qu├ębec
    Jun 19, 2004
  2. Jakir
    Replies:
    4
    Views:
    3,223
    Jakir
    Sep 1, 2004
  3. seenuvas
    Replies:
    7
    Views:
    2,662
    Roedy Green
    Jan 24, 2006
  4. seenuvas
    Replies:
    0
    Views:
    522
    seenuvas
    Jan 24, 2006
  5. Hal Vaughan
    Replies:
    11
    Views:
    1,122
    Gordon Beaton
    May 22, 2006
Loading...

Share This Page