开发者

download remote machine files using java

开发者 https://www.devze.com 2023-02-09 18:51 出处:网络
I would like to download somefiles which is in remote shared folder from the local system using java code. Can you please guide us, how i can proceed this. Whether i need use http or ftp. But i want t

I would like to download somefiles which is in remote shared folder from the local system using java code. Can you please guide us, how i can proceed this. Whether i need use http or ftp. But i want to execute the code only in the local machine. It should not like client server program. Please post some tips over here.

Thanks in advan开发者_Go百科ce.


You cannot solve this without knowing the platform of your machine (where the app runs) and remote machine. But once you know you have many possibilities.

Agent full solution

Install agent on remote machine. The agent should expose API that allows access to the files. For example you can use FTP server as an agent. Then access this server and download your files. Alternatively you can implement your own application or servlet running in one of available servlet containers and provide access to files over HTTP.

Agent-less solution

Use the built-in functionality of target machine. For example use SSH to connect to Unix machine and SMB for windows. Both support Telnet You can use VFS package from jakarta. There are several implementations of SSH. I recommend JSH.

0

精彩评论

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

关注公众号