Process p = Runtime.getRuntime().exec("ftp"); Process p1 = Runtime.getRuntime().exec("open servername.xxx.xxx.com"); Process p2 = Runtime.getRuntime().exec("USERNAME"); Process p3 = Runtime.getRuntime().exec("PASSWORD"); Process p4 = Runtime.getRuntime().exec("cd ../../oraexp/ORACLE/xxxx/export/XML/"); Process p5 = Runtime.getRuntime().exec("put 23005.xml"); Process p6 = Runtime.getRuntime().exec("quit"); Process p7 = Runtime.getRuntime().exec("quit"); I tried to Run these, but i am getting errors I am on a windows 2000 box, and i am trying to ftp to a oracle unix server.
The way that you have it set up each of those commands tries to start a different unrelated process on the operating system, each with their own little window or whatever. Not a good idea. Try putting all of the commands into a String array and just starting ONE process.
"JavaRanch, where the deer and the Certified play" - David O'Meara
If you know ant, you can use ant optional task ftp. Or you can use ant as your teacher to learn how to use oro's NetComponent.jar. It is licenced software, but it is free to use for you to develop your own software. http://jakarta.apache.org/ant/manual/OptionalTasks/ftp.html Need Java real project experience? Join our project team here! [ January 26, 2002: Message edited by: Roseanne Zhang ]