给你个例子:
public class TestCmd {
public TestCmd(){}
public static void main(String args[]){
try {
Process process = Runtime.getRuntime().exec("cmd.exe /c starthttp://www.csdn.net");
}catch (Exception e)
{
e.printStackTrace();
}
}
}
}
实现了访问网站的功能
public class TestCmd {
public TestCmd(){}
public static void main(String args[]){
try {
Process process = Runtime.getRuntime().exec("cmd.exe /c starthttp://www.csdn.net");
}catch (Exception e)
{
e.printStackTrace();
}
}
}
}
实现了访问网站的功能
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货