title: What's the reason for "Error:Cannot determine Java VM executable in selected JDK"?
body: <p>I am using IntelliJ IDEA 13.1.4 and also tried the latest release 14.</p>
  
  <p>Running SBT I get the following error:</p>
  
  <pre><code>Error:Cannot determine Java VM executable in selected JDK
  </code></pre>
  
  <p>I have JDK 1.7 installed on my machine and on PATH.</p>
  
  <p>In the logs (<code>~/Library/Logs/IntelliJIdea14/idea.log</code> on MacOS) there's the following stack trace:</p>
  
  <pre><code>2014-11-03 11:22:05,054 [4896641]   WARN - nal.AbstractExternalSystemTask - Cannot determine Java VM executable in selected JDK
  com.intellij.openapi.externalSystem.model.ExternalSystemException: Cannot determine Java VM executable in selected JDK
      at org.jetbrains.sbt.project.SbtExternalSystemManager$$anonfun$10.apply(SbtExternalSystemManager.scala:97)
      at org.jetbrains.sbt.project.SbtExternalSystemManager$$anonfun$10.apply(SbtExternalSystemManager.scala:97)
      at scala.Option.getOrElse(Option.scala:120)
      at org.jetbrains.sbt.project.SbtExternalSystemManager$.executionSettingsFor(SbtExternalSystemManager.scala:96)
      at org.jetbrains.sbt.project.SbtExternalSystemManager$$anonfun$getExecutionSettingsProvider$1.apply(SbtExternalSystemManager.scala:54)
      at org.jetbrains.sbt.project.SbtExternalSystemManager$$anonfun$getExecutionSettingsProvider$1.apply(SbtExternalSystemManager.scala:54)
      at org.jetbrains.sbt.package$$anon$3.fun(package.scala:29)
      at org.jetbrains.sbt.package$$anon$3.fun(package.scala:28)
      at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.getExecutionSettings(ExternalSystemApiUtil.java:590)
      at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.a(ExternalSystemFacadeManager.java:201)
      at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.a(ExternalSystemFacadeManager.java:178)
      at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doInvoke(ExternalSystemFacadeManager.java:133)
      at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager$MyHandler.invoke(ExternalSystemFacadeManager.java:270)
      at com.sun.proxy.$Proxy57.getResolver(Unknown Source)
      at com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:48)
      at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:137)
      at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:123)
      at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$2.execute(ExternalSystemUtil.java:475)
      at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3$1.run(ExternalSystemUtil.java:543)
      at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:609)
      at com.intellij.openapi.progress.impl.ProgressManagerImpl$7.run(ProgressManagerImpl.java:410)
      at com.intellij.openapi.progress.impl.ProgressManagerImpl$3.run(ProgressManagerImpl.java:194)
      at com.intellij.openapi.progress.impl.ProgressManagerImpl.a(ProgressManagerImpl.java:281)
      at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:233)
      at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:181)
      at com.intellij.openapi.application.impl.ApplicationImpl$10$1.run(ApplicationImpl.java:640)
      at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:405)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:56)
  </code></pre>
  
  <p>What can be the reason for this?</p>