日期:2014-05-20  浏览次数:20652 次

如何 程序实现 设置 系统的环境变量?
比如要在程序里实现设置“Path”等环境变量,如何实现?
谢!

------解决方案--------------------
http://flycondor.blogchina.com/3560207.html
------解决方案--------------------
调用dos命令就可以了 具体什么命令你自己baidu一下吧
------解决方案--------------------
这样试下。
String command= "cmd.exe /C path C:\jdk1.5\bin ";
try{
Runtime ce=Runtime.getRuntime();
ce.exec(command);
}
catch(Exception){}