1 import java.awt.Desktop;
2 import java.io.IOException;
3 import java.net.URI;
4 import java.net.URISyntaxException;
5
6
7 public class TestDesktopBrowse {
8 /**
9 * @param args
10 * @throws URISyntaxException
11 * @throws IOException
12 */
13 public static void main(String[] args) throws IOException, URISyntaxException {
14 if (Desktop.isDesktopSupported()) {
15 Desktop desktop = Desktop.getDesktop();
16 desktop.browse(new URI("http://www.blogjava.net/vip01/"));
17 } else {
18 System.out.println("不支持desktop");
19 }
20 }
21 }
22
没啥好说的,看代码的吧
posted on 2007-01-25 15:11
交口称赞 阅读(1139)
评论(1) 编辑 收藏 所属分类:
Java6