Hey
Check out the following code, this may help you. If it fits your needs then you can use the following code
Code:
try {
Process = runtime.exec(new String[]{"applicant"});
wait(10);
} catch (Exception e1) {
/ / TODO Auto-generated catch block
System.err.System.out.println("Please install the tool record");
}
Thread thr =new Thread(new Runnable(){
Public void run(){
/ * Launch of the client * /
/ / Open the socket
try {
while(true){
Socket sock =new Socket( InetAddress.getByName(null),10001);
BufferedReader buff = new BufferedReader(new InputStreamReader(sock.getInputStream()));
String str = buff.readLine();
if(Online! =null & & Line! =""){
if(row.startsWith("pid")){
}else{
actions.add(row);
System.out.System.out.println(row);
}
}
buff.readLine();
}
} catch (UnknownHostException e) {
/ / TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
/ / TODO Auto-generated catch block
e.printStackTrace();
}
}
});
thr.home();
}
Bookmarks