简体   繁体   English

Java sftpChannel put错误(系统找不到指定的路径)

[英]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.

相关问题 如何解决Java错误“系统找不到指定的路径”? - How to Solve Java Error “The system cannot find the path specified”? 系统找不到Java中指定的路径 - The system cannot find the path specified in java 系统找不到指定的路径(java eclipse) - The system cannot find the path specified (java eclipse) 文件错误为:-java.io.FileNotFoundException:\\ files \\ storetime.txt(系统找不到指定的路径) - Error in file is :- java.io.FileNotFoundException: \files\storetime.txt (The system cannot find the path specified) 如何解决系统在 Windows 10 Java 中找不到指定路径的错误? - How to resolve system cannot find the path specified error in windows 10 Java? PrintWriter : java.io.FileNotFoundException: 系统找不到指定的路径 - PrintWriter : java.io.FileNotFoundException: The system cannot find the path specified java.io.IOException:系统找不到指定的路径 - java.io.IOException: The system cannot find the path specified 系统找不到指定的路径(Java开发工具包) - The system cannot find the path specified (Java Development Kit) java.io.IOException:系统找不到指定的路径 - java.io.IOException: The system cannot find the path specified Java(Spring MVC)系统找不到指定的路径 - Java (Spring MVC) The system cannot find the path specified
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM