I started using Gradle and Intellij but I am having problems to configure Gradle\'s JVM. When I start a new Gradle project I am not allowed to define JVM as my JAVA_HOME variabl
If you'd like to have your JAVA_HOME recognised by intellij, you can do one of these:
launchctl setenv JAVA_HOME "/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home"
To directly answer your question, you can add launchctl line in your ~/.bash_profile
As others have answered you can ignore JAVA_HOME by setting up SDK in project structure.