Opening default browser from java

by rajesh 2009-12-30 17:13:01

The following code can be used to open the default browser with the web page mentioned by us

if(java.awt.Desktop.isDesktopSupported()){
try {
java.net.URI uri = new java.net.URI("www.hiox.com");
desktop.browse( uri );
}
catch ( Exception e ) {
System.err.println( e.getMessage() );
}
}

Tagged in:

1190
like
0
dislike
0
mail
flag

You must LOGIN to add comments