Created
November 29, 2013 16:51
-
-
Save theShadow89/7708637 to your computer and use it in GitHub Desktop.
Open Url in Browser
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.Desktop; | |
import java.net.URI; | |
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")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment