if (Runtime.getRuntime().exec(
new String[] { "which", browsers[count] })
.waitFor() == 0)
browser = browsers[count];
if (browser == null) {
throw new XBayaException("Could not find web browser.");
} else {
Runtime.getRuntime().exec(new String[] { browser, url });
}
}
} catch (ClassNotFoundException e) {
throw new XBayaException(ERROR_MESSAGE, e);
} catch (NoSuchMethodException e) {
throw new XBayaException(ERROR_MESSAGE, e);
} catch (IllegalAccessException e) {
throw new XBayaException(ERROR_MESSAGE, e);
} catch (InvocationTargetException e) {
throw new XBayaException(ERROR_MESSAGE, e);
} catch (IOException e) {
throw new XBayaException(ERROR_MESSAGE, e);
} catch (InterruptedException e) {
throw new XBayaException(ERROR_MESSAGE, e);
} catch (RuntimeException e) {
throw new XBayaException(ERROR_MESSAGE, e);
}
}