KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > MultiLogon


1 import jcifs.smb.*;
2
3 public class MultiLogon {
4
5     public static void main( String JavaDoc argv[] ) throws Exception JavaDoc {
6         if (argv.length < 1) {
7             System.err.println( "usage: Dual <cred1> <cred2> <smburl>\n");
8             return;
9         }
10
11         NtlmPasswordAuthentication auth1 = new NtlmPasswordAuthentication( argv[0] );
12         NtlmPasswordAuthentication auth2 = new NtlmPasswordAuthentication( argv[1] );
13
14         SmbFile f1 = new SmbFile( argv[2], auth1 );
15         SmbFile f2 = new SmbFile( argv[2], auth2 );
16
17         f1.exists();
18         f2.exists();
19     }
20 }
21
22
Popular Tags