I have to run a batch files from a java program which need administrative privilege. I am using the below command
runtime.getruntime().exec(\"runas /user:Admin \
when i was kid a did this
echo Pa$$W0Rd | some_command_expects_it