I have gpg command which encrypts the file
gpg --batch --yes -o abc.csv.gpg -r 'balu shanmukh' -e A2.java
in the above command
--batch
--yes
-o
-r and -e are options
and balu shanmukh is the value.
the command is prepared dynamically and the command prepaed is the above. this command is being exected in commandline but when this command is running from
Runtime.getRuntime().exec(command);
am getting error message as usage: gpg [options] [filename]
their is no problem with gpg classs path or anything because if i remove the single quote for the value which doesnt have space in between the command is getting executed properly from java.
only the problem when we have space in value . then its mandatory to use quote for value and if i use it . commad is not getting executed properly
I didnt understand the behaviour? can any one help me to understand this behaviour