[jcifs] Help

Malleswararao_Narikimilli Malleswararao_Narikimilli at satyam.com
Wed Oct 4 07:42:24 GMT 2006

I have downloaded the jcifs-1.2.9.jar and tried a sample as below. 


public class MyApp {


          public static void main(String[] args) {

                   try {

                             jcifs.Config.setProperty( "jcifs.netbios.wins", "" );

                             String strFilePath = "smb://admin:$wpsSep06@";

                             SmbFileInputStream in = new SmbFileInputStream(strFilePath);

                             byte[] b = new byte[8192];

                             int n;

                             while(( n = in.read( b )) > 0 ) {

                                      System.out.write( b, 0, n );


                   } catch (Exception e) {




} this points to a windows 2000 server in our intranet. I am getting the following exception.


jcifs.smb.SmbException: The network name cannot be found.

          at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:510)

          at jcifs.smb.SmbTransport.send(SmbTransport.java:610)

          at jcifs.smb.SmbSession.sessionSetup(SmbSession.java:269)

          at jcifs.smb.SmbSession.send(SmbSession.java:225)

          at jcifs.smb.SmbTree.treeConnect(SmbTree.java:147)

          at jcifs.smb.SmbFile.connect(SmbFile.java:791)

          at jcifs.smb.SmbFile.connect0(SmbFile.java:761)

          at jcifs.smb.SmbFile.open0(SmbFile.java:816)

          at jcifs.smb.SmbFile.open(SmbFile.java:845)

          at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:69)

          at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:62)

          at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:49)

          at MyApp.main(MyApp.java:22)


Please help me, how to use JCIFS to create file in windows host.

Thanks and Regards,

Malleswara Rao

This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.
-------------- next part --------------
HTML attachment scrubbed and removed

More information about the jcifs mailing list