i am trying to copy files which are in jar file to the system32 folder of my machine using the following code
Runtime r=Runtime.getRuntime();
Process p=r.exec("cmd /c copy hello.dll c:\\windows\\system32\\");
But here the file is not copied???!!!!
but when iam giving
Runtime r=Runtime.getRuntime();
Process p=r.exec("cmd /c copy hello.dll c:\\windows\\");
the file is copied to the windows folder……
can any one help me……….
iam using a windows 7 machine
Make sure your command prompt(or IDE) is running in an Administrator mode, if your are running your program via command prompt.