1 import jcifs.UniAddress; 2 import java.util.Enumeration ; 3 4 public class TortureTest5 extends Thread { 5 6 String name; 7 8 TortureTest5( String name ) { 9 this.name = name; 10 } 11 12 public void run() { 13 try { 14 System.out.println( UniAddress.getByName( name )); 15 } catch( Exception e ) { 16 e.printStackTrace(); 17 } 18 } 19 20 public static void main( String [] argv ) throws Exception { 21 24 Thread [] threads = new Thread [30]; 25 for( int i = 0; i < argv.length; i++ ) { 26 threads[i] = new TortureTest5( argv[i] ); 27 } 28 for( int t = 0; t < argv.length; t++ ) { 29 threads[t].start(); 30 } 31 for( int j = 0; j < argv.length; j++ ) { 32 threads[j].join(); 33 } 34 System.exit( 0 ); 35 } 36 } 37 | Popular Tags |