}
}
//
if (interactive) {
RemoteServer server = new RemoteServer(0);
int port = server.bind();
log.log(Level.INFO, "Callback server set on port " + port);
sb.append(port);
String options = sb.toString();
Integer pid = pids.get(0);
final VirtualMachine vm = VirtualMachine.attach("" + pid);
log.log(Level.INFO, "Loading agent with command " + options + " as agent " + agentFile.getCanonicalPath());
vm.loadAgent(agentFile.getCanonicalPath(), options);
server.accept();
shell = server.getShell();
closeable.add(new Closeable() {
public void close() throws IOException {
vm.detach();
}
});