Results 1 to 4 of 4
  1. #1
    rajpalparyani is offline Member
    Join Date
    Feb 2011
    Posts
    2
    Rep Power
    0

    Default Call one Java Program from another Java Program

    Hi All,

    I have 2 Java Programs on 2 different machines , say J1 and J2 Programs on M1 and M2 Machines respectively..

    I want to call the J2 Program on M2 to be called by J1 Program on M1 ..

    Could someone please suggest someways to do that ?

    One of the possible ways I could think if J1 Program is logging through ssh on M2 and call the Java Program J2 , but as I need information to be passed between the 2 programs at different intervals i.e. one program should wait for an input from another program (sometimes J1 has to wait for some information from J2 and vice-versa) , I need some way I could achieve this ..

    I will be grateful if someone could suggest some tutorial where I could see this happen , or suggest something that could help me out ..

    Looking forward to your response.

    Thanks,
    Raj

  2. #2
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,798
    Rep Power
    7

    Default

    Runtime.exec

    Warning: google and read about the pitfalls in using this.

  3. #3
    rajpalparyani is offline Member
    Join Date
    Feb 2011
    Posts
    2
    Rep Power
    0

    Default

    Runtime.exec is the solution when the program is in the sam machine ..

    also I can use runtime.exec with ssh or telnet which I do not want to do ..

  4. #4
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    7

Similar Threads

  1. Replies: 8
    Last Post: 09-30-2010, 06:32 PM
  2. Replies: 4
    Last Post: 07-30-2010, 12:25 PM
  3. how to call dll file in java program
    By santhosh_el in forum AWT / Swing
    Replies: 6
    Last Post: 06-12-2009, 09:23 PM
  4. Is it possible to make a Phone call program using java?
    By fireball2008 in forum New To Java
    Replies: 2
    Last Post: 05-08-2008, 06:20 PM
  5. How to call C/C++ Program from Java
    By sanjeevtarar in forum Advanced Java
    Replies: 1
    Last Post: 04-17-2008, 08: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
  •