简体   繁体   English

我如何使用Java在远程计算机(LAN)中上传文件

[英]How can i upload file in remote machine(LAN) using java

我该如何使用Java程序在远程计算机(LAN)中上传文件。我想在LAN中连接远程计算机并将文件从本地计算机上传至远程计算机。所以请告诉我该怎么做。

I suggest you use JSch . 我建议您使用JSch You'll be able to connect easily to a remote machine and it allows you to execute file transfer using sftp for example . 您可以轻松地连接到远程计算机,它允许您使用的SFTP执行文件传输例子

It's hard to find a real documentation for JSch, but the various examples they give on their site are really complete and in general sufficient to help one succeeding in his task. 很难找到JSch的真实文档,但是他们在站点上提供的各种示例确实很完整,并且通常足以帮助一个成功完成任务的人。

You probably want an HTTP client library for Java, to issue an HTTP POST request. 您可能希望Java的HTTP客户端库发出HTTP POST请求。 (I assume the remote machine has some web server to upload the file). (我假设远程计算机具有一些Web服务器来上传文件)。

Google gives several suggestions, like Hc.Apache Google提出了一些建议,例如Hc.Apache

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何通过局域网访问我的java项目中的远程oracle数据库,我的机器上没有安装Oracle - How can i access Remote oracle Database in my java project via LAN, Oracle is not installed in my machine 如何使用Java计算远程计算机的磁盘空间? - How can I calclulate the diskspace of a remote machine using java? 如何使用Java在远程计算机上执行Linux命令? - How can I execute Linux commands on a remote machine using Java? 如何使用Java将文件从本地计算机上传到Web服务以进行ftp传输? - How can I upload a file from my local machine to a webservice for ftp transfer using java? 我们如何使用Java从本地计算机打开远程计算机上存在的文件? - How can we open a file present on remote machine from local machine using java? 如何使用Java在远程机器中打开路径并在该路径中写入文件 - How to open a path in remote machine and write a file in that path using java 如何使用Java11在远程机器中创建文件/目录 - How to create a file / directory in remote machine using Java11 如何在远程计算机上将Java与R集成? - How can I integrate Java with R on a remote machine? 如何访问远程计算机上存在的文件? - How can I access to a file exists on remote machine? 如何通过使用 Selenium Grid 将文件从本地机器传输到远程 web 服务器来上传文件 - How to upload a file by transfering the file from the local machine to the remote web server using Selenium Grid
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM