56
public static boolean urlOeffnen(JFrame paFrame, String url) throws URISyntaxException {
56
public static void urlOeffnen(JFrame paFrame, String url) throws URISyntaxException {
57
57
if (Desktop.isDesktopSupported()) {
58
58
Desktop d = Desktop.getDesktop();
60
60
if (d.isSupported(Desktop.Action.BROWSE)) {
61
61
d.browse(new URI(url));
64
} catch (Exception ignored) {
68
if (Daten.mVConfig.get(MVConfig.SYSTEM_URL_OEFFNEN).equals("")) {
69
String text = "\n Der Browser zum Anzeigen der URL wird nicht gefunden.\n Browser selbst auswählen.";
70
DialogProgrammOrdnerOeffnen dialog = new DialogProgrammOrdnerOeffnen(paFrame, true, "", "Browser suchen", text);
71
dialog.setVisible(true);
73
programm = dialog.ziel;
76
programm = Daten.mVConfig.get(MVConfig.SYSTEM_URL_OEFFNEN);
78
Runtime.getRuntime().exec(programm + " " + url);
79
Daten.mVConfig.add(MVConfig.SYSTEM_URL_OEFFNEN, programm);
80
ListenerMediathekView.notify(ListenerMediathekView.EREIGNIS_PROGRAMM_OEFFNEN, UrlHyperlinkAction.class.getSimpleName());
64
81
} catch (Exception ex) {
67
if (Daten.mVConfig.get(MVConfig.SYSTEM_URL_OEFFNEN).equals("")) {
68
String text = "\n Der Browser zum Anzeigen der URL wird nicht gefunden.\n Browser selbst auswählen.";
69
DialogProgrammOrdnerOeffnen dialog = new DialogProgrammOrdnerOeffnen(paFrame, true, "", "Browser suchen", text);
70
dialog.setVisible(true);
72
programm = dialog.ziel;
75
programm = Daten.mVConfig.get(MVConfig.SYSTEM_URL_OEFFNEN);
77
Runtime.getRuntime().exec(programm + " " + url);
78
Daten.mVConfig.add(MVConfig.SYSTEM_URL_OEFFNEN, programm);
79
ListenerMediathekView.notify(ListenerMediathekView.EREIGNIS_PROGRAMM_OEFFNEN, UrlHyperlinkAction.class.getSimpleName());
80
} catch (Exception eex) {
81
Daten.mVConfig.add(MVConfig.SYSTEM_URL_OEFFNEN, ""); // dann wars wohl nix
82
Log.fehlerMeldung(316497658, Log.FEHLER_ART_PROG, UrlHyperlinkAction.class.getName(), eex, "URL öffnen: " + url);
82
Daten.mVConfig.add(MVConfig.SYSTEM_URL_OEFFNEN, ""); // dann wars wohl nix
83
Log.fehlerMeldung(316497658, UrlHyperlinkAction.class.getName(), ex, "URL öffnen: " + url);