Skip to content

Commit bf49ac9

Browse files
committed
Update OSUtil.java
1 parent 8466954 commit bf49ac9

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/main/java/io/github/axolotlclient/util/OSUtil.java

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,19 @@ public static OperatingSystem getOS() {
3434
}
3535

3636
public enum OperatingSystem {
37-
WINDOWS("win"),
37+
WINDOWS("win"){
38+
@Override
39+
protected String[] getURLOpenCommand(URL url) {
40+
return new String[]{"rundll32", "url.dll,FileProtocolHandler", url.toString()};
41+
}
42+
},
3843
LINUX("nix", "nux", "aix"),
39-
MAC("mac"),
44+
MAC("mac") {
45+
@Override
46+
protected String[] getURLOpenCommand(URL url) {
47+
return new String[]{"open", url.toString()};
48+
}
49+
},
4050
OTHER();
4151

4252
final String[] s;
@@ -70,7 +80,7 @@ public void open(URI uri) {
7080

7181
}
7282

73-
private String[] getURLOpenCommand(URL url) {
83+
protected String[] getURLOpenCommand(URL url) {
7484
String string = url.toString();
7585
if ("file".equals(url.getProtocol())) {
7686
string = string.replace("file:", "file://");

0 commit comments

Comments
 (0)