If you just want to open up the webpage, I think less is more in this case:
import java.awt.Desktop;
import java.net.URI; //Note this is URI, not URL
class BrowseURL{
public static void main(String args[]) throws Exception{
// Create Desktop object
Desktop d=Desktop.getDesktop();
// Browse a URL, say google.com
d.browse(new URI("http://google.com"));
}
}
}