//We wait untill the creating process has ended and released the
// socket bind.
boolean ok = false;
try {
while(!ok) {
try{
ServerSocket server = new ServerSocket(6880, 50, InetAddress.getByName("127.0.0.1"));
ok = true;
server.close();
} catch(Exception e) {
Logger.log("Exception while trying to bind on port 6880 : " + e);
Thread.sleep(1000);
}
}
} catch(Exception e) {
Logger.log("Exception while running Started : " +e);
}