Software Development

How to Run UNIX SFTP in Java To FTP File

This post shows how to run the native Unix sftp command in Java to upload files. We basically want to run the following command in Java. The Unix command is not directly translational to Java. However, we want to execute the same command. To accomplish this, we need to use Java’s Runtime  class.

Requirements

These are the things we used for this post.

  • Windows 7 Professional SP1
  • Eclipse – Kepler Release
  • Java 1.7 (1.7.0_67 – Windows x86)
  • Unix or Linux OS with sftp installed

The Codes

Get the Codes

Loading

Got comments or suggestions? We disabled the comments on this site to fight off spammers, but you can still contact us via our Facebook page!.


You Might Also Like