package com.test;

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

public class TestHtml {

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