Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do I establish and keep an SMB connection using java?

843790Dec 3 2008 — edited Dec 6 2008
I am writing an app that requires me to manipulate files on my samba network. I tried to do this using the JCIFS class and I can successfully authenticate using smbSession.logon(), but that does not keep the connection open.

Here is the code I am working with:
InetAddress ip = InetAddress.getByName("serverName");
UniAddress myDomain = new UniAddress(ip);
NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication("domain", "username","password");
SmbSession.logon(myDomain, auth);

Does anyone know of a way to create an SMB connection in java, using JCIFS or not?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 3 2009
Added on Dec 3 2008
4 comments
1,095 views