throw new BuildException("Failed to exit forked process.", throwable);
}
}
private int findFreePort() throws BuildException {
Socket socket = new Socket();
socket.setServer("localhost");
for(int i = 60 * 1024; i < 65000; i++) {
socket.setPort(i);
if(!socket.eval()) {
return i;
}
}
throw new BuildException("Failed to locate a free port off which to launch StandAloneBootStrapper.");