I am logging on Windows server 2008 R2 using my windows account that is a member of administrators group. I need to run a java program to modify some local files for which the administrators have "Change" right. But I keep getting FileNotFoundException due to access denied.
Then from the error message, I got know the file to be changed and made it changable to normal users and then I can run my java program 1 step further. But this is not the solution because there are a lot files to be changed.
Question: can I pass my administrator account and password to java.exe so that it can run with full privilege to access those files? Or any other solution?
java version "1.6.0_22". Java(TM) SE Runtime Environment (build 1.6.0_22-b04). Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode).