Hey there mate. Here it goes.
Code:
import java.awt.Desktop;
import java.net.URI;
public class BrowseURL {
public static void main(String args[]) throws Exception{
// Create desktop object
Desktop desktop=Desktop.getDesktop();
// Browse a URL
desktop.browse(new URI("http://google.com"));
}
}
Cheers ;)