import?java.io.IOException;
import?java.net.URI;
import?java.net.URISyntaxException;
/**
*?@author?毛興宇 *?@time2013年9月14日 */public?class?Gotourl?{
public?static?void?main(String[]?args)?{
//啟用cmd運行IE的方式來打開網址。
String?str?=?"cmd?/c?start?iexplore?http://192.168.1.103/output.cgi?text=*3422F050&submit=Submit";
try?{
Runtime.getRuntime().exec(str);
}?catch?(IOException?e)?{
e.printStackTrace();
}
//啟用系統默認瀏覽器來打開網址。
try?{
URI?uri?=?new?URI("http://192.168.1.103/output.cgi?text=*3422F050&submit=Submit");
Desktop.getDesktop().browse(uri);
}?catch?(URISyntaxException?e)?{
e.printStackTrace();
}?catch?(IOException?e)?{
e.printStackTrace();
}
}
}
這是調用ie打開的代碼