Results 1 to 4 of 4
- 04-05-2012, 01:14 AM #1
Member
- Join Date
- Apr 2012
- Posts
- 5
- Rep Power
- 0
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
- 04-05-2012, 02:16 AM #2
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,619
- Rep Power
- 5
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.
- 04-05-2012, 03:44 AM #3
Member
- Join Date
- Apr 2012
- Posts
- 5
- Rep Power
- 0
Re: Interactions between two separate programs?
Awesome! Thank you so much =]
- 04-05-2012, 06:09 AM #4
Member
- Join Date
- Apr 2012
- Posts
- 5
- Rep Power
- 0
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
-
Separate Numbers
By gozuhair in forum New To JavaReplies: 38Last Post: 07-21-2011, 11:42 AM -
Multiple interactions with same socket
By Anoop in forum New To JavaReplies: 2Last Post: 11-29-2010, 06:50 PM -
How to separate return value ??
By doha786 in forum New To JavaReplies: 1Last Post: 03-10-2010, 03:43 PM -
Should I separate my code into separate files?
By Inks in forum New To JavaReplies: 0Last Post: 03-26-2009, 12:12 AM -
How to log the users interactions with database in struts?
By piterskiy in forum Web FrameworksReplies: 0Last Post: 07-28-2008, 09:49 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks