jcifs

access to file using Java with Samba JCIFS

牧云@^-^@ 提交于 2019-11-26 22:02:41
I have a question about accessing file with Samba JCIFS. So there is a server I want to access, let's call it server.unv.edu and the workgroup is WKGRP. there is a share in this server: \\server.unv.edu\pcb$ the way I am trying to access to the server is : public class SMBAuthenticator extends NtlmAuthenticator{ private String username = "username"; private String password = "password"; private String domain = "smb://server.unv.edu/WKGRP/"; public SMBAuthenticator(){ NtlmAuthenticator.setDefault(this); } and public class SMBConnection{ public String urlString = "smb://server.unv.edu/pcb$/path

JCIFS: file retrieval is too slow to be usable

老子叫甜甜 提交于 2019-11-26 20:15:03
问题 I was just testing JCIFS for accessing Windows shares. It is very slow to the point of being completely unusable. import jcifs.smb.*; class First { public static void main(String[] args) throws Exception { try { //jcifs.Config.setProperty( "jcifs.netbios.wins", "192.168.1.220" ); NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication("domain.com", "Administrator", "password"); SmbFile f = new SmbFile("smb://10.17.15.12/Share/xml/file.xml", auth); SmbFileInputStream in = new

Android ServerSocket programming with jCIFS streaming files

穿精又带淫゛_ 提交于 2019-11-26 12:12:14
问题 I\'ve got a bit of an issue and I\'ve been asking regarding it quite a few times, but I think I\'m one step closer now, so hopefully someone can help me with the rest. My previous questions: Connect to NAS device from Android How to open files in Android with default viewer using jCIFS Put simply - I want to create an application that: Can connect to a NAS device using jCIFS Is capable of launching files in the default viewer - i.e. a video in the video player The first part is relatively

connecting to shared folder in windows with java

雨燕双飞 提交于 2019-11-26 08:12:14
问题 I need to connect to a shared folder on a remote windows machine through java , where i put my domain authentication (username and password ) in the code , here is my code File file = new File(\"\\\\\\\\theRemoteIP\\\\webapps\"); File[] files = file.listFiles(); System.out.println(\"acssed done\"); for (int i = 0; i < files.length; i++) { String name = files[i].getName(); System.out.println(name); } Thanks 回答1: You should use SmbFile and NtlmPasswordAuthentication from JCIFS. Here is a simple