This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
i am trying to push a file to server by sftp but i am getting error
[scp] Connecting to x.x.x.x:22
[scp] Sending: myfile.txt : 20
[scp] File transfer time: 0.97 Average Rate: 20.66 B/s
com.jcraft.jsch.JSchException: 2: No such file
here is my code
and i am using
Apache Ant version 1.7.1
Java version: 1.5
You need to check the section of the log in debug mode where it tries to upload the file, you should see it try to resolve the full path to your file before uploading it. You want to make sure that that path is correct first.