Problem in accessing environment variables with jni
posted 6 years ago
i'm writing a jni application where i prepared a DLL. In side the dll, i am able to get the value of an environment variable using getenv("MY_ENV_VAR") when i tested the DLL with another exe linked to that. But, when it is loaded with System.LoadLibrary(""), the DLL is not able to find the environment variable's value ( as getenv("MY_ENV_VAR") is returning NULL ).
please somebody get me a reason/solution . . .
Thanks in advance. . . . .