Results 1 to 6 of 6
  1. #1
    md_suzon is offline Member
    Join Date
    Sep 2011
    Posts
    9
    Rep Power
    0

    Default Is there an alternative to Runtime.getRuntime().exec()

    In very short; I have two separate java application. One is my main application which is like a container. Another is completely different module which will be run under my main application.

    Now: I can run by using "Runtime.getRuntime().exec()" ... this is working

    But I need some alternative of Runtime.getRuntime().exec(). can anyone help me ?

    Thanks

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,534
    Blog Entries
    7
    Rep Power
    20

    Default Re: Is there an alternative to Runtime.getRuntime().exec()

    Simply call the main( ... ) method of your other Java application; you can even do that from a separate thread.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    md_suzon is offline Member
    Join Date
    Sep 2011
    Posts
    9
    Rep Power
    0

    Default Re: Is there an alternative to Runtime.getRuntime().exec()

    JosAH,
    i told that, it is working fine ...
    Runtime.getRuntime().exec("java -jar "+jar_run_paths);

    I need alternative API, have you any idea ?

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,534
    Blog Entries
    7
    Rep Power
    20

    Default Re: Is there an alternative to Runtime.getRuntime().exec()

    You don't need another API; simply call the main( ... ) method from that other Java program.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    7

    Default Re: Is there an alternative to Runtime.getRuntime().exec()

    Jos, you forgot the *jedihandwave*
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

  6. #6
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,534
    Blog Entries
    7
    Rep Power
    20

    Default Re: Is there an alternative to Runtime.getRuntime().exec()

    Quote Originally Posted by PhHein View Post
    Jos, you forgot the *jedihandwave*
    Yep, sometimes I don't know what to say/write anymore (and that doesn't happen often ;-)

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Runtime.getRuntime().exec() and pppd
    By mysticav in forum Networking
    Replies: 7
    Last Post: 02-15-2011, 07:44 PM
  2. Replies: 5
    Last Post: 07-07-2010, 12:50 PM
  3. Slow Output reading with Runtime.getRuntime().exec()
    By gmcouto in forum Advanced Java
    Replies: 8
    Last Post: 05-14-2010, 10:42 AM
  4. help with Runtime.getRuntime().exec
    By collin389 in forum AWT / Swing
    Replies: 3
    Last Post: 11-09-2009, 04:22 AM
  5. 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

Posting Permissions

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