Christian Posta bio photo

Christian Posta

Field CTO at, author Istio in Action and Microservices for Java Developers, open-source enthusiast, cloud application development, committer @ Apache, Serverless, Cloud, Integration, Kubernetes, Docker, Istio, Envoy #blogger

Twitter Google+ LinkedIn 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"