I am using Java on Windows XP and want to be able to send commands to another program such as telnet. I do not want to simply execute another program. I want to execute it,
You may take a look at the Telnet Ant task you can call it directly in your code with out having to use a build.xml file.
build.xml
You can also take a look at the source code and see how they do it.