admin 管理员组

文章数量: 887021

package com.test;

import java.awt.Desktop;
import java.io.IOException;
import java.URI;
import java.URISyntaxException;

public class TestHtml {

	public static void main(String[] args) {
		String str = "cmd /c start iexplore http://www.baidu";
		try {
			Runtime.getRuntime().exec(str);
		} catch (IOException e) {
			e.printStackTrace();
		}
		try {
			URI uri = new URI("http://www.baidu");
			Desktop.getDesktop().browse(uri);
		} catch (URISyntaxException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}

 

本文标签: 浏览器 网页 java