Results 1 to 2 of 2
  1. #1
    coco is offline Member
    Join Date
    Jul 2007
    Posts
    39
    Rep Power
    0

    Default I need to call and run another program

    Hi, I'm having lots of problems it would seem but my latest one (and hopefully my last) is this,
    I have my min programme running but i need to call and run another program (which also has its own main method), but i cant seem to get it to work.

    Any ideas?
    Thanks.

  2. #2
    brianhks is offline Senior Member
    Join Date
    Jul 2007
    Posts
    135
    Rep Power
    0

    Default

    Does one just need to call the other or do they both need to run at the same time. If it is the first case just make the following call:
    Java Code:
    SecondProgramMainClass.main(new String[] { "first arg", "second arg" });
    If you want them both to run at the same time you will need to start up a thread that then in turn does the above.

Similar Threads

  1. How to call C/C++ Program from Java
    By sanjeevtarar in forum Advanced Java
    Replies: 1
    Last Post: 04-17-2008, 09:55 AM
  2. Replies: 0
    Last Post: 04-04-2008, 03:40 PM
  3. how to call a dll from java
    By katie in forum Advanced Java
    Replies: 3
    Last Post: 12-10-2007, 11:34 AM
  4. Replies: 0
    Last Post: 10-04-2007, 10:33 PM
  5. Replies: 1
    Last Post: 08-07-2007, 07:16 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
  •