Specifying custom JVM for SBT causes "access is denied" errors


I'm using IntelliJ IDEA 13.1.4 with Scala plugin v 0.41.

I tried to specify that SBT should run with a Java 8 JVM, using the SBT IDE Settings page:

  O Default
  X Custom
  Home: C:\Program Files\Java\jdk1.8.0

However, when I next start IntelliJ IDEA, it attempts to perform an SBT project refresh, but fails with the following message:

SBT 'myproject' project refresh failed
Error: Cannot run program "C:/Program Files/Java/jdk1.8.0" (in directory "C:\Users\me\Documents\src\myproject"): CreateProcess error=5, Access is denied
CreateProcess error=5, Access is denied

Instead of using the specified JVM home path as the root of the associated JVM (as, say, JAVA_HOME does), it seemed that IntelliJ was trying to execute the jdk1.8.0 directory as though it was an executable file. I tried selecting other folders within the JDK installation, with no luck (the dialog does not permit selection of a file).

I am able to workaround the problem by configuring SBT to use the default JVM, instead of a custom JVM, and to specify Java 8 as the default JVM.

Any ideas? Am I configuring the custom JVM incorrectly? Is this a bug?

Original message URL: http://devnet.jetbrains.net/message/5521666#5521666


Please sign in to leave a comment.