I have had trouble with the environmental variables in UNIX when accessing them through Java (i.e. using exec, or getenv). I found that java doesnt correctly read my environmental variables ! For example, a quick "echo $PATH" yields a
string with 5 path values in it (/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/:/usr/local/bin/MyPrograms) but in java, my "Path" as displayed using process.exec has only 3 entries (/bin:/sbin:/usr/bin:/usr/sbin).
Is there a way to force java to obtain the "Path" using the same method that my "shells" use ? I've never really thought about the shells and where they get their environmental variables from, but it seems like they always seem to work !