package com.metacodestudio.hotsuploader.utils;

import java.awt.*;
import java.io.IOException;
import java.net.URI;

public class DesktopWrapper {

    private Desktop desktop;

    public DesktopWrapper() {
        if (Desktop.isDesktopSupported() && !StormHandler.isLinux()) {
            desktop = Desktop.getDesktop();
        }
    }

    public void browse(URI uri) throws IOException {
        if (usingNative()) {
            desktop.browse(uri);
        } else {
            Runtime.getRuntime().exec("xdg-open " + uri.toURL());
        }
    }

    private boolean usingNative() {
        return desktop != null;
    }
}

@@ -171,16 +171,138 @@
 sktop;%0A%0A
+    /**%0A     * Sets up a desktop wrapper object to support %7B@link Desktop%7D actions that differ between platforms.%0A     */%0A
     publ

document the reasoning behind the existence of the desktop wrapper