• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

FTP USING RUNTIME CLASS

 
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
test
 
I don't like that guy. The tiny ad agrees with me.
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic