-
September 23rd, 2009, 09:33 AM
#1
connecting two programs
i am having a GUI of LOGIN page and a GUI of Music Player
i want that after loging through (my login page program) my music player program should execute.
i want to link both the programs..
plas help me....
-
September 23rd, 2009, 10:46 AM
#2
Re: connecting two programs
Can you explain the context? Exactly what is a 'login page program', i.e. in what sense is it a program? Does it use Swing?
Can you post some code?
A prudent question is one-half of wisdom...
F. Bacon
Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.
-
September 27th, 2009, 10:12 AM
#3
Re: connecting two programs
I suppose the relevant topic here would be "inter process communication".
In the Java contect you have several opportunities to transmit information between two Java processes, like named pipes, sockets, files, signals. Both communicating programs have to run before communicating, of course.
It directly depends on what information you actually want to transmit between the two programs which variant to choose.
The most powerful and easiest to implement is probably the socket approach. Defining one of your programs is server (e.g. the music player) and one as client (e.g. your login program). For more details on how to implement you can find alot of examples on the web.
If you plan to start your music player application after a successful login in your login application you could simply using Runtime.getRuntime().exec method and connect to the started program's input and output streams.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|