/** * open the URL in the users default browser (hopefully) * * @param url the url to open */ private void openUrl(String url) { String errMsg = "Error attempting to launch web browser: "; boolean error = true; log.debug("Opening URL " + url); try { final BrowserLauncher launcher = new BrowserLauncher(); launcher.openURLinBrowser(url); error = false; } catch (UnsupportedOperatingSystemException e) { log.error(e); errMsg += e.getLocalizedMessage(); } catch (BrowserLaunchingInitializingException e) { log.error(e); errMsg += e.getLocalizedMessage(); } if (error) JOptionPane.showMessageDialog(null, errMsg); }