1 package captest; 2 3 import java.net.*; 4 import java.io.*; 5 6 7 public class ExecuteCapabilityTestFile { 8 public static void main (String argv[]) { 9 try { 10 String str = argv[0]; 11 int port = Integer.parseInt(str); 12 System.out.println("test"); 13 Socket socket = null; 14 PrintStream ps = null; 15 try { 16 socket = new Socket ("localhost",port); 17 ps = new PrintStream(socket.getOutputStream()); 18 Class clazz = Class.forName("aa.testFsXX"); 19 System.out.println(clazz); 20 ps.println("class found"); 21 } catch (ClassNotFoundException e ) { 22 ps.println ("no class found"); 23 } 24 socket.close(); 25 } catch(IOException ioe) { 26 ioe.printStackTrace(); 27 } 28 } 29 } 30 | Popular Tags |