Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Error Code 21, public key Encryption error - Urgent

843811Aug 11 2006 — edited Aug 17 2006
Hi,
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 14 2006
Added on Aug 11 2006
2 comments
376 views