Fix for #4
This commit is contained in:
parent
ef2f0ad2db
commit
e48eb648fe
|
@ -80,8 +80,14 @@ class Desktop {
|
||||||
}
|
}
|
||||||
else if (java.awt.Desktop.isDesktopSupported() && java.awt.Desktop.getDesktop()
|
else if (java.awt.Desktop.isDesktopSupported() && java.awt.Desktop.getDesktop()
|
||||||
.isSupported(java.awt.Desktop.Action.BROWSE)) {
|
.isSupported(java.awt.Desktop.Action.BROWSE)) {
|
||||||
java.awt.Desktop.getDesktop()
|
EventQueue.invokeLater(() -> {
|
||||||
.browse(uri);
|
try {
|
||||||
|
java.awt.Desktop.getDesktop()
|
||||||
|
.browse(uri);
|
||||||
|
} catch (IOException | URISyntaxException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
throw new IOException("Current OS and desktop configuration does not support browsing for a URL");
|
throw new IOException("Current OS and desktop configuration does not support browsing for a URL");
|
||||||
|
|
Loading…
Reference in New Issue