Loading
SCP with ANT Example

Java Quick Notes

Refresh Your Java - Before Java Interview

We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....


Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet

Go to SiteMap

Q)  SCP with ANT Example


Ans)

SCP Example :

In Java World.

Use "org.apache.tools.ant.taskdefs.optional.ssh.Scp" if you want to copy a file remotely using SCP.

import org.apache.tools.ant.taskdefs.optional.ssh.Scp;

public synchronized boolean copyAFile(String orderId,
                                       File localFile,
                                       ) throws Exception
      {
    scp = new Scp();
    Project p = new Project();
    p.init();
    scp.setProject( p );
    scp.setTrust(true);
    scp.setPort( SCP_PORT_NO );
    scp.setFile(localFile.getPath());
    scp.setTodir(sshHostUri);
    scp.execute();
  }
  



Back to top

------------------------- We hope you got necessary Info On -----------------------------------------

SCP with ANT Example


SCP with ANT Example

-------------------------------------------------------------------------------------------------------



Face Book
Request for a Mock Interview/Training

Get a PDF

Face Book
Same look (Read) on any device, this is Ads free