Results 1 to 2 of 2
  1. #1
    260191894 is offline Member
    Join Date
    Jun 2012
    Posts
    6
    Rep Power
    0

    Default How to launch two Java programs?

    Hi everyone!

    I wrote a server program and a client program. I need to first launch the Server program and then launch the Client program. The problem is that the Terminal won't let me. For example, I wrote:
    javac Server.java
    javac Client.java
    java Server
    java Client

    But the Client program will only start when the Server program closes and will then have a connection error because the server is no longer available. I am using mac OS. Can someone please tell me how to launch both programs simultaneously?

    Thank you!

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

    Default Re: How to launch two Java programs?

    Start server in one process and start the client in another. You can do this by using two terminals, or run the first process in the background by terminating the start command with an ampersand

Similar Threads

  1. Cannot launch Java application
    By Coolcambo in forum New To Java
    Replies: 1
    Last Post: 11-24-2011, 02:00 PM
  2. how to launch and work within an external software using java
    By qwertyuiop415263 in forum New To Java
    Replies: 12
    Last Post: 07-13-2011, 04:08 PM
  3. Can I launch a program from a Java application?
    By kemiga in forum New To Java
    Replies: 5
    Last Post: 07-13-2011, 12:05 PM
  4. Java is crashing when trying to launch Minecraft
    By Highpsi in forum Java Gaming
    Replies: 0
    Last Post: 04-03-2011, 05:41 PM
  5. Java Application fails to launch without error
    By javaguy78 in forum AWT / Swing
    Replies: 9
    Last Post: 11-16-2010, 06:25 PM

Posting Permissions

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