Results 1 to 4 of 4
- 02-14-2011, 02:41 AM #1
Member
- Join Date
- Feb 2011
- Posts
- 2
- Rep Power
- 0
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
- 02-14-2011, 03:27 AM #2
Runtime.exec
Warning: google and read about the pitfalls in using this.
- 02-14-2011, 03:29 AM #3
Member
- Join Date
- Feb 2011
- Posts
- 2
- Rep Power
- 0
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 ..
- 02-14-2011, 04:13 AM #4
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,606
- Rep Power
- 5
Communicating between sockets might help you out. See
Lesson: All About Sockets (The Java Tutorials > Custom Networking)
Similar Threads
-
how to call 2 java programs in one another java program
By renu in forum New To JavaReplies: 8Last Post: 09-30-2010, 06:32 PM -
Is There A Way To Call Another Java Program Within A Java Program
By SwissR in forum New To JavaReplies: 4Last Post: 07-30-2010, 12:25 PM -
how to call dll file in java program
By santhosh_el in forum AWT / SwingReplies: 6Last Post: 06-12-2009, 09:23 PM -
Is it possible to make a Phone call program using java?
By fireball2008 in forum New To JavaReplies: 2Last Post: 05-08-2008, 06:20 PM -
How to call C/C++ Program from Java
By sanjeevtarar in forum Advanced JavaReplies: 1Last Post: 04-17-2008, 08:55 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks