I am using MacOs Catalina 10.15.7. I add an env variable "LOG_PATH" in .bash_profile. After that, I restart computer and run printenv. I can see that variable. So far so good.
I have a java code to get the value from that env variable:
System.out.println("LOG PATH="+System.getenv("LOG_PATH"));
But it returns null. How does that happen?