May not be pretty, but you can do this by launching the program via Runtime.exec() and retrieving the Process
Process proc = Runtime.exec("Your Program Here");
Once you have the Process reference, you can retrieve the InputStream, OutputSream, and ErrorStream to read and write. Reading and writing from the Process should (ideally) be performed in separate threads. One problem I've noticed in doing it this way that I haven't researched thoroughly is when a program receives an error from the ErrorStream (possibly through stderr from the exe), the connection becomes severed.