CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2009
    Posts
    3

    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....

  2. #2
    dlorde is offline Elite Member Power Poster
    Join Date
    Aug 1999
    Location
    UK
    Posts
    10,163

    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.

  3. #3
    Join Date
    Sep 2009
    Posts
    2

    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
  •  





Click Here to Expand Forum to Full Width

Featured