for (int count = 0; count < browsers.length && browser == null; count++)
if (Runtime.getRuntime().exec(
new String[] {"which", browsers[count]}).waitFor() == 0)
browser = browsers[count];
if (browser == null)
throw new JMException("Could not find web browser");
else
Runtime.getRuntime().exec(new String[] {browser, url});
}
} catch (Exception e) {
e.printStackTrace();