} catch (MalformedURLException e) {
final String errMsg = "Error building webstart relaunch URL from " + codeBaseURL.toString();
LOG.error(errMsg, e);
throw new RuntimeException(errMsg, e);
}
if (basicService.showDocument(relaunchURL)) {
LOG.info("Relaunched agent via URL: " + relaunchURL.toString() + ". Will kill current agent now.");
doKill(); // don't wait for build finish, since we've already relaunched at this point.
} else {
final String errMsg = "Failed to relaunch agent via URL: " + relaunchURL.toString();
LOG.error(errMsg);