I am working on decryption a PGP file which I could accomplish using Python as I absolutely could not find the resources/example for it. I did raise the problem here with no luck!
However, I did develop some code in Java to decrypt the file.
Now, I want to invoke this jar file from my python code since I can find people using the os.system or subprocess.call to invoke external programmes in a similar fashion.
Below is the sample code which is supposed to do the work:
 os.system("java -jar PGPEncryption.jar BC.csv.pgp X.csv <password>")
 x = subprocess.call(["java -jar PGPEncryption.jar BC.csv.pgp X.csv <password>"], shell=True)
 print(x)
I have no luck with printing a result.
Any Suggestions will be really appreciated!!
EDIT: I have also tried below code:
subprocess.call(['java', '-jar', 'abc.jar'])
it's not working and gives below error:
 Exception in thread "main" java.lang.UnsupportedClassVersionError: 
        pgpencryption/PGPExampleUtil : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(Unknown Source)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$000(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: pgpencryption.PGPExampleUtil. Program will exit.
 
     
    