Don't know. How do you identify the credentials when you run it from the command line? Don't go anywhere near Runtime.exec() until you have read Michael Daconta's classic article when Runtime.exec() won't.
What are you doing in my house? Get 'em tiny ad!
a bit of art, as a gift, that will fit in a stocking