mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
SPARK-1801 Fix links openining in KDE environment
This commit is contained in:
@ -34,7 +34,16 @@ public class BrowserLauncher {
|
|||||||
if (url.startsWith("www")) {
|
if (url.startsWith("www")) {
|
||||||
url = "http://" + url;
|
url = "http://" + url;
|
||||||
}
|
}
|
||||||
Desktop.getDesktop().browse(new URI(url));
|
try
|
||||||
|
{
|
||||||
|
Desktop.getDesktop().browse(new URI(url));
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
Runtime.getRuntime().exec("xdg-open " + url);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
File f = new File(url);
|
File f = new File(url);
|
||||||
if (f.exists() && Desktop.isDesktopSupported()){
|
if (f.exists() && Desktop.isDesktopSupported()){
|
||||||
|
|||||||
Reference in New Issue
Block a user