import java.awt.Desktop;
import java.net.URI;
public class Main {
public static void main(final String args[]) {
URI uri = new URI("http://toster.ru");
Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;
if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {
try {
desktop.browse(uri);
} catch (Exception e) {
e.printStackTrace();
}
}
}
}