Results 1 to 4 of 4
  1. #1
    tilex is offline Member
    Join Date
    Apr 2009
    Posts
    2
    Rep Power
    0

    Default To start external program with Runtime.getRuntime().exec(...) in foreground

    I have a JFrame with JTable. When I click a row in JTable another GUI process is started with Runtime.getRuntime().exec(...), e.g. "notepad.exe". However that new window appears not in foreground, but below my swing window. How to start a new process window and bring it to top?
    (WindowsXP, jre 1.6_12)

  2. #2
    toadaly is offline Senior Member
    Join Date
    Jan 2009
    Posts
    671
    Rep Power
    6

    Default

    The new process is independent of the spawning process. You have to use whatever constructs it has to bring it to the top.

  3. #3
    tilex is offline Member
    Join Date
    Apr 2009
    Posts
    2
    Rep Power
    0

    Default

    And what constructs I can use to control another process window in Java? JNI or anything else?

  4. #4
    toadaly is offline Senior Member
    Join Date
    Jan 2009
    Posts
    671
    Rep Power
    6

    Default

    ...check the command line options of the process you are spawning.

Similar Threads

  1. grep on multiple files using Runtime.getRuntime().exec()
    By cprash.aggarwal in forum Advanced Java
    Replies: 3
    Last Post: 02-11-2009, 06:55 AM
  2. Replies: 6
    Last Post: 12-29-2008, 02:47 PM
  3. help with Runtime.exec()
    By Lanfear in forum New To Java
    Replies: 18
    Last Post: 12-16-2008, 11:09 AM
  4. Replies: 1
    Last Post: 11-14-2008, 06:56 AM
  5. Runtime.exec()
    By hknyo in forum Advanced Java
    Replies: 2
    Last Post: 08-16-2008, 12:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •