Christian Posta bio photo

Christian Posta

Global Field CTO at solo.io, author 'Istio in Action', 'AI Gateways in the Enterprise' and other books. He is known for being an architect, speaker, blogger and contributor to AI and infrastructure open-source projects.

LinkedIn Twitter Github Stackoverflow

Apparently, even if you put your environment variables into your .profile, IntelliJ won't pick it up. Which makes sense since .profile is for setting your shell environment. To set environment variables that IntelliJ (or any non-bash app) can see, such as the M2_HOME var needed for maven integration, create a file in /etc called "launchd.conf" (if it doesn't already exist... if it does, then just add the lines to it) and add a line such as "setenv M2_HOME /usr/bin/maven"