To build this you will need to obtain the following depenencies. The Bouncy Castle versions may need to be different based on your JDK level.
bcpg-jdk15-141.jar
bcprov-jdk15-141.jar
commons-cli-1.1.jar
Then you can try something like:
java net.tamas.bcpg.DecryptAndVerifyFile -d test2_secret.asc -p secret -v test1_pub.asc -i test.txt.asc -o verify.txt
And expect to get a verify.txt that's the same as test.txt. Maybe.
Here’s the download: PgpDecryptAndVerify.zip