I will use exec in my Java code but I need to get the environment first because exec requires the env as the second argument as a String array.
"envp - array of strings, each element of which has environment variable settings in the format name=value, or null if the subprocess should inherit the environment of the current process."
The way I can get the environment variable is with getenv() which returns a map.
So, in order for me to use exec, I need to convert the map into the form name=value before I call exec.
Can you please show me how I can make this conversion?