How do I set environment variables permanently in Mac OS 10.15.6?
tried everything I could find online, but to no avail.
want to permanently set
the JAVA_HOME and
PATH environment variables so that in IntelliJ I can issue commands like “mvn”.
I’ve written the script into
.bash_profile like this:
But after I restart my Mac and issue
echo $JAVA_HOME, the output is still empty.
I also tried
launchd.conf answer, but it is also useless.
Can someone help me?
Thanks in advance!
For osx, add this to your ~/
.profile or if you use zsh
Restart your terminal or simply apply your changes
If you are using zsh, you can import
the .profile configuration in