开发者

Transfer files from Unix to Winxp server using Jsch

开发者 https://www.devze.com 2023-02-12 03:10 出处:网络
I\'m writing a Java program, to transfer files from Unix server to Windows using the JSch library :)

I'm writing a Java program, to transfer files from Unix server to Windows using the JSch library :) Maybe someone could help me find some example code on how to download a file? I am looking for functions something like these:

Jsch new= Jsch(); 
new.downloadFilesFromServer(String filename);

new.saveFileLocation(String location)    //   i mean the righ开发者_如何转开发t function names

I tried the simple JSch example and I can connect to server, complete one operation, and disconnect. So far the only functions I've found in documentation were more-or-less connecting to the server or disconnecting, but not the file download functions, or a JSch full tutorial (if one exists :D ).


Take a look at the ScpFrom jsch example which shows you how to copy a remote file to somewhere local.

0

精彩评论

暂无评论...
验证码 换一张
取 消