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.