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();
}
}
}