This worked for me:
In the Build Tools > Maven > Runner > Environment Variables settings, set JAVA_HOME to your JDK home path.
Usually you want to use the same Java JDK that you use in IntelliJ. You can find this under Project Structure > Platform Settings > SDKs under the JDK home path .
eg. /Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home
Andrea Bergonzo Oct 28 '17 at 0:15 2017-10-28 00:15
source share