    001package net.minecraft.client.gui;
    002
    003import cpw.mods.fml.relauncher.Side;
    004import cpw.mods.fml.relauncher.SideOnly;
    005import java.net.URI;
    006
    007@SideOnly(Side.CLIENT)
    008public class GuiButtonLink extends GuiButton
    009{
    010    public GuiButtonLink(int par1, int par2, int par3, int par4, int par5, String par6Str)
    011    {
    012        super(par1, par2, par3, par4, par5, par6Str);
    013    }
    014
    015    public void func_96135_a(String par1Str)
    016    {
    017        try
    018        {
    019            URI uri = new URI(par1Str);
    020            Class oclass = Class.forName("java.awt.Desktop");
    021            Object object = oclass.getMethod("getDesktop", new Class[0]).invoke((Object)null, new Object[0]);
    022            oclass.getMethod("browse", new Class[] {URI.class}).invoke(object, new Object[] {uri});
    023        }
    024        catch (Throwable throwable)
    025        {
    026            throwable.printStackTrace();
    027        }
    028    }
    029}