• Post Reply Bookmark Topic Watch Topic
  • New Topic

Accessing external programs  RSS feed

 
Klaus Schoenentwee
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I wish to access a non Java program (Winamp) by sending it a message,
like this...



How is this done in Java (properly), through the Java API somehow?

thanks
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by timothy twoshoes:


How is this done in Java (properly), through the Java API somehow?

SendMessage() is very much Windows-specific. I believe that there is no platform independent model of it in Java.

Therefore, you either have to find another way to interact with your external program (does it have a CORBA API, for instance?) or you have to use JNI. The JNI code for the above would be really very easy, once you got over the initial JNI learning curve.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Timothy --

Welcome to JavaRanch!

It looks like you may not have read our naming policy on the way in. It reqiures that you use a full, real (sounding) first and last name for your display name, and I'm not convinced that you're meeting the "real-sounding" criterion. You can change your display name here.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!