Hi All, MY OS is : Linux.
I have written a Java Program to run a GPG Command using Java's exec command like: Runtime.getRuntime().exec(command); The command here is a gpg encryption command like : gpg --recipient "alapati" --output "Encrypted/SampleEncrypted.gpg" --encrypt "Sample.txt" If i run this command from terminal it is working fine . But if i run this command from java program it is giving the following error.The java program is executed from root users context.I tried setting the ring key as well but the same error was coming. Error is: [r...@esbing01 GnuPG]# java TestGPG "/oracleGL/GnuPG/gnupg-1.4.9/g10" "/oracleGL/GnuPG" ENCRYPT COMMAND: gpg --keyring /root/.gnupg/pubring.gpg --recipient "alapati" --output "Encrypted/SampleEncrypted.gpg" --yes --encrypt "Sample.txt" 2 gpg: "alapati": skipped: public key not found gpg: "Sample.txt": encryption failed: public key not found Failed. But if the same java program was ran from windows machine with the same setup it works fine . Only in linux it is giving the following error. Tried lot of options but nothing is working.Please help me.It is very urgent for my project. If you need any other info let me know, Regards, alapati. -- View this message in context: http://old.nabble.com/PUBLIC-KEY-NOT-FOUND-tp30597673p30597673.html Sent from the GnuPG - User mailing list archive at Nabble.com. _______________________________________________ Gnupg-users mailing list [email protected] http://lists.gnupg.org/mailman/listinfo/gnupg-users
