title: Failed to run tests in gradle project with error : 'Could not create the Java Virtual Machine'
body: <p>I am trying to execute a test inside a gradle project.But when Itry to execute the tests using 'gradle test' in Intellij it fails .</p>
  
  <p>what I have tried</p>
  
  <ol>
  <li><p>create and build the project without error using 'gradle clean build'</p></li>
  <li><p>open run configuration in intellij , select gradle , and create and execution with gradle task 'test'</p></li>
  <li><p>execute newly created gradle run configuration</p></li>
  </ol>
  
  <p>what I observe</p>
  
  <ol>
  <li><p>gradle fails at task 'test' with error 'Error: Could not create the Java Virtual Machine.'</p></li>
  <li><p>also gradle run never stops until I forcefully stop it</p></li>
  <li><p>also it keep printing ' gradle executor 1(,2,3 and so on) executing , failed '</p></li>
  </ol>
  
  <p>I am using java 9 , intellij , gradle .</p>