What's the reason for "Error:Cannot determine Java VM executable in selected JDK"?

You should be able to work it around by setting the jdk from the settings not from the open/import project dialog.

From the welcome screen, go to Configure -> Project defaults -> Project structure and add the jdk.

enter image description here

Opening the sbt project should work well then.

Found solution from here


Another way to set JDK is from your current module/project settings (for your current project)

PickOpen Module Settings from project context menu (or default hit F4),
then from left tab select Project and point correct Project SDK on dropdown.

enter image description here


The issue is usually caused by a wrong JDK version in ".idea/sbt.xml", e.g.:

<option name="jdk" value="1.7" />

This option is not updated accordingly when the Project SDK is changed, see SCL-10085. If you have the other JDK (1.7 in my example) generally configured, no error will occur, but the Project SDK will silently be changed back. Otherwise, this error occurs.

The problem can easily be resolved by manually editing the value in ".idea/sbt.xml" to the right JDK version.