Skip to content

Commit

Permalink
Merge branch 'protegeproject:master' into patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
mosfet80 authored Feb 25, 2025
2 parents 63af3d6 + f6d053a commit 8ea448d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ public class NativeBrowserLauncher {
public static void openURL(String url) {
try {
if (OSUtils.isOSX()) {
Class fileMgr = Class.forName("com.apple.eio.FileManager");
Class<?> fileMgr = Class.forName("com.apple.eio.FileManager");
Method openURL = fileMgr.getDeclaredMethod("openURL", String.class);
openURL.invoke(null, url);
}
else if (OSUtils.isWindows()){
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);
Runtime.getRuntime().exec(new String[] {"rundll32", "url.dll,FileProtocolHandler", url});
}
else { //assume Unix or Linux
String[] browsers = {
"firefox", "opera", "konqueror", "epiphany", "mozilla", "netscape" };
"xdg-open", "firefox", "opera", "konqueror", "epiphany", "mozilla", "netscape" };
String browser = null;
for (int count = 0; count < browsers.length && browser == null; count++)
if (Runtime.getRuntime().exec(
Expand Down

0 comments on commit 8ea448d

Please sign in to comment.