Results 1 to 4 of 4
  1. #1
    ashley3 is offline Member
    Join Date
    Apr 2012
    Posts
    5
    Rep Power
    0

    Default Interactions between two separate programs?

    I'm writing a scoring program for a middle school quiz bowl tournament and have a few questions. Basically I have two separate Java programs (both completely functional). The first is for a match (there are many matches in one tournament) and keeps track of the scores during the match. It is projected during the matches so the audience can see the current scores. The second program keeps track of all the scores for each of the matches that have been played / are being played. It is projected in the lobby as a sort of digital bracket system. Currently, the scoring program for the match sends an email at the end of the match to a specified address. Then the person in the lobby checks that email address and updates the bracket. Multiple matches are being played at any given time and there is occasionally more than one bracket (too many teams sign up for the tournament so two brackets are created).

    I'm trying to figure out if there is some way I could connect the two programs and have the bracket automatically update every time a match is completed. Is this possible? Any suggestions?

    Also, is there a way that multiple computers could access these programs at the same time without having to download the program to each computer and without the programs conflicting? I was thinking I might be able to change them to applets, but I'm unsure if that would help.

    I'm still somewhat new to Java programming (a little under a year of experience) and could really use the help. Thank you so much for any and all assistance

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

    Default Re: Interactions between two separate programs?

    Several ways, depending upon criteria.
    Sockets: Lesson: All About Sockets (The Java™ Tutorials > Custom Networking)
    RMI: Trail: RMI (The Java™ Tutorials)
    If you are on the same machine and one instance controls the other, then Runtime.exec could also be used using IO.

    Based upon the info you provided, my guess would be that sockets might be the way to go.

  3. #3
    ashley3 is offline Member
    Join Date
    Apr 2012
    Posts
    5
    Rep Power
    0

    Default Re: Interactions between two separate programs?

    Awesome! Thank you so much =]

  4. #4
    ashley3 is offline Member
    Join Date
    Apr 2012
    Posts
    5
    Rep Power
    0

    Default Re: Interactions between two separate programs?

    I added the Socket related classes and the programs run and interact wonderfully on my own computer. However, when I run either one of the programs on a different computer, the client program (match scoring program) can't find the host computer to update the bracket. I'm pretty sure I have the correct name for the host computer. What else could cause this to happen? Could it be because I am on a public network rather than a private/home network?

Similar Threads

  1. Separate Numbers
    By gozuhair in forum New To Java
    Replies: 38
    Last Post: 07-21-2011, 11:42 AM
  2. Multiple interactions with same socket
    By Anoop in forum New To Java
    Replies: 2
    Last Post: 11-29-2010, 06:50 PM
  3. How to separate return value ??
    By doha786 in forum New To Java
    Replies: 1
    Last Post: 03-10-2010, 03:43 PM
  4. Should I separate my code into separate files?
    By Inks in forum New To Java
    Replies: 0
    Last Post: 03-26-2009, 12:12 AM
  5. How to log the users interactions with database in struts?
    By piterskiy in forum Web Frameworks
    Replies: 0
    Last Post: 07-28-2008, 09:49 PM

Tags for this Thread

Posting Permissions

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