• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Java <-> Other Program Communication

 
Ranch Hand
Posts: 103
Netbeans IDE Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, today I was really wondering, is this possible to "communicate" java program with other programs (lets say for example Messenger or something else)

Lets say, simple example.

- Simple java GUI aplication with text field
- Windows Live Messenger

And now lets say someone will change his status at MSN to "available" and java program will print in text field "someone changed status"

My friend told me that, such communication with another program is possible, he told me that I need proper "protocol"

Ok, Im also Gadu-Gadu user (it is polish communicator) I found protocol of this program when someone will send messageto us:

#define GG_RECV_MSG80 0x002e

struct gg_recv_msg80 {
int sender; /* numer nadawcy */
int seq; /* numer sekwencyjny */
int time; /* czas nadania */
int class; /* klasa wiadomości */
int offset_plain; /* położenie treści czystym tekstem */
int offset_attributes; /* położenie atrybutów */
char html_message[]; /* treść w formacie HTML (zakończona \0) */
char plain_message[]; /* treść czystym tekstem (zakończona \0) */
char attributes[]; /* atrybuty wiadomości */
};



And now Im wondering how can i use something like this in my test java application.

Thanks in advance for any help.
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi Mathew,

Well, it is possible for other program communication using java. But the thing is that the other application should be developed, such as to accept or provide replies to your java program. For example, If you take microsoft word, you can manipulate certain things automatically, using COM. Microsoft had developed it in such a way so that programmers can use it. I am not aware of msn messenger. You better check out the documentation of the application that you are going to communicate.

If an application accepts input from stdin and gives output through stdoutput, then you can use the Process and Runtime classes to create a process and then using the getInputStream() and getOutputStream() methods, you can communicate with the process.

Hope this helps.

Regards,
Hari
 
Greenhorn
Posts: 6
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mathew,

probably Microsoft would like developers to communicate with their servers directly instead of communicating with the app.
If you google it you'll see there is an API available.
http://social.msdn.microsoft.com/forums/en-US/wlmessengerapidev/threads/
http://www.programmableweb.com/api/msn-messenger

I am not familiar with it. They say it contains a JavaScript API (perhaps only that?). Using that you can possibly build some level of integration let's say into your JSP pages.

Hope this helps.

Tamas
 
You had your fun. Now it's time to go to jail. Thanks for your help tiny ad.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic