简体   繁体   English

可以直接看到.network share,但是看不到来自JAVA >> jcifs.smb.SmbException: The.network name cannot be found

[英]Can see the network share directly, but not from JAVA >> jcifs.smb.SmbException: The network name cannot be found

I can expand the code if needed, but generally this is what is happening如果需要,我可以扩展代码,但通常情况就是这样

(from Windows machine) (来自Windows机器)

explorer \\hostname\folder1\folder2

=> works, I can see the contents => 有效,我可以看到内容

from Java来自 Java

import jcifs.smb.*;

<..snip..>

String dest = "smb://hostname//folder1//folder2//file1.txt";

NtlmPasswordAuthentication authentication = new NtlmPasswordAuthentication(domain,username,password);
SmbFile file = new SmbFile(dest, authentication); 

jcifs.smb.SmbException: The.network name cannot be found jcifs.smb.SmbException: 找不到网络名称

Does this mean something is not supported?这是否意味着不支持某些内容? Tried single and double slashes.试过单斜线和双斜线。

The double slashes are required only after the protocol.只有在协议之后才需要双斜线。 Look at the difference here:看看这里的区别:

smb://hostname//folder1//folder2//file1.txt
smb://hostname/folder1/folder2/file1.txt

Also be aware that jcifs is a SMB implementation purely in Java. While the original jcifs library is no longer maintained (and since Windows 10 connections based on that old protocol are no longer accepted) be sure to use a more up to date version of the library, such as jcifs-ng .另请注意,jcifs 是纯粹在 Java 中的 SMB 实现。虽然不再维护原始 jcifs 库(并且自 Windows 起不再接受基于该旧协议的 10 个连接),请务必使用更新版本的库,例如jcifs-ng

暂无
暂无

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

相关问题 jcifs.smb.SmbException: 找不到网络名称 - jcifs.smb.SmbException: The network name cannot be found jcifs.smb.SmbException:系统找不到指定的文件? - jcifs.smb.SmbException: The system cannot find the file specified? JCIFS jcifs.smb.SmbException:连接到系统的设备无法运行 - JCIFS jcifs.smb.SmbException: A device attached to the system is not functioning JCIFS 错误 jcifs.smb.SmbException: 0xC00000BB - JCIFS error jcifs.smb.SmbException: 0xC00000BB jcifs.smb.SmbException:访问被拒绝。 smb目录的异常 - jcifs.smb.SmbException: Access is Denied. exception for smb directories jcifs.smb.SmbException:连接失败:0.0.0.0&lt;00&gt;/192.168.43.103 jcifs.util.transport.TransportException java.net.SocketException - jcifs.smb.SmbException: Failed to connect: 0.0.0.0<00>/192.168.43.103 jcifs.util.transport.TransportException java.net.SocketException jcifs.smb.SmbException:参数不正确错误-登录表单不用于输入凭据+ NTLMv1请求 - jcifs.smb.SmbException: The parameter is incorrect error- Login form not for entering credential+NTLMv1 request 如何使用Java中的jcifs将文件从smb共享复制到本地驱动器? - How to copy file from smb share to local drive using jcifs in Java? 将多个文件推送到本地文件夹中的 smb 共享 jcif - Pushing multiple files to smb share jcifs from local folder jcifs copyTo从一个网络到另一个网络路径不起作用 - jcifs copyTo from one network to other network path not working
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM