Hi All,
I am using jdk 1.8 and I wrote code to run gpg command in ProcessBuilder like below
ProcessBuilder pb = new ProcessBuilder("cmd","/C","gpg --batch --yes --cipher-algo 3DES -r ED873D23 --trust-model always --output (folder_path) --encrypt Input_File_path");
Process p=pb.start();
p.waitFor();
It is not creating encrypted file in given folder_path through above code but, in command prompt if I execute above command which I have given in parameter its creating encrypted file in given folder_path properly.
And I used Runtime.getRuntime().exec(" cmd.exe /C gpg --batch --yes --cipher-algo 3DES -r ED873D23 --trust-model always --output (folder_path) --encrypt Input_File_path"); It is also not workig
Please suggest
Thanks in advance.