[英]Java sftpChannel put error (The system cannot find the path specified)
I am going to transfer files to remote sftp by Java sftpchannel.我将通过 Java sftpchannel 将文件传输到远程 sftp。 Everything are going to be as expected.
一切都会按预期进行。 It was well tested on STS (Spring Tool Suite 4.7.1).
它在 STS(Spring Tool Suite 4.7.1)上经过了很好的测试。 But it failed when it was deployed to tomcat server.
但是在部署到 tomcat 服务器时失败了。
// Logs // 日志
File path: S:/System/AutoSend/Data.json
Remote path: Data.json
Before sftp put
Sftp error: 4: java.io.FileNotFoundException: S:\System\AutoSend\Data.json (The system cannot find the path specified)
(Unix-formated path has been transformed to windows format automatically?) (Unix 格式的路径是否已自动转换为 windows 格式?)
What can I do to fix the issue?我能做些什么来解决这个问题? Thanks a lot.
非常感谢。
Have you tried making the File Path a String?您是否尝试过将文件路径设为字符串? Like this: "S:/System/AutoSend/Data.json" and is the "S" Drive on your Tomcat-Server?
像这样:“S:/System/AutoSend/Data.json”,是 Tomcat 服务器上的“S”驱动器吗? If not, try using the IP-address instead.
如果没有,请尝试改用 IP 地址。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.