Error Code 21, public key Encryption error - Urgent
843811Aug 11 2006 — edited Aug 17 2006Hi,
We have a Java application, which uses PGP for data file encryption.
This application works fine and generates the encrypted PGP files.
We want this application to start automatically when the computer rebooted.
So we created 'windows service' for this application, windows service calls the Main method of the program when it get started. Windows service is also running good.
But when we run the Application using windows Service, It does not create the encrypted PGP files. It gives error code �21�, which means "public key encryption error"
But the same application works and generates encrypted PGP files when we call it on command prompt.
We calls the PGP program:
Process p =
Runtime.getRuntime().exec(
"pgp +force -e " + sourceFile + " " + userName + " -o " + destinationFile);
Any suggestion is appreciated.
Thanks,
Rajesh