日期:2014-05-20 浏览次数:20933 次
public class RunIE
{
public static void main(String args[])
{
try
{
//Runtime.getRuntime().exec("cmd /c start http://www.163.com"); //2000 or XP 方法一
//Runtime.getRuntime().exec("command /c start http://www.163.com"); //98
/*String command = "D:/Program Files/Internet Explorer/IEXPLORE.EXE"; //方法二
Process child = Runtime.getRuntime().exec(command);*/
Runtime.getRuntime().exec("cmd /c start iexplore"); //方法三
//说明:其实这里调用的start就相当于 开始菜单中的运行指令,程序后面的内容其实就是要在运行框中要输入的内容,如notepad打开记事本,pbrush打开画板等。
}
catch(Exception e)
{
System.out.println(e);
}
}
};
------解决方案--------------------
另外,在windows下java也可以操作注册表的,具体你可以google ”java 注册表“,应该能搜索到。这类东西,不一定用security类。
------解决方案--------------------
关注.........
------解决方案--------------------
學習!
.
------解决方案--------------------
关注.........
------解决方案--------------------