• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

FTP USING RUNTIME CLASS

 
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bhasker Reddy
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do i do that
can you be more specific
 
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
test
 
Happily living in the valley of the dried frogs with a few tiny ads.
create, convert, edit or print DOC and DOCX in Java
https://products.aspose.com/words/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!