I use Apache Mina Sshd API to start up a local SFTP server in java.In SFTP client i use Jcraft jsch API to create my SFTP client.I successf
In more recent sshd versions you can use org.apache.sshd.common.file.virtualfs.VirtualFileSystemFactory and supply it to the SshServer instance via method setFileSystemFactory.
Snippet:
VirtualFileSystemFactory fileSystemFactory = new VirtualFileSystemFactory();
fileSystemFactory.setDefaultHomeDir("home.directory");
sshd.setFileSystemFactory(fileSystemFactory)