title: Unable to run SparkR in Rstudio
body: <p>I cant use sparkR in Rstudio because im getting some error: Error in sparkR.sparkContext(master, appName, sparkHome, sparkConfigMap,  : </p>
  
  <blockquote>
    <p>JVM is not ready after 10 seconds</p>
  </blockquote>
  
  <p>I have tried to search for the solution but cant find one. Here is how I have tried to setup sparkR:</p>
  
  <pre><code>Sys.setenv(SPARK_HOME="C/Users/alibaba555/Downloads/spark")  # The path to your spark installation 
  
  .libPaths(c(file.path(Sys.getenv("SPARK_HOME"), "R", "lib"), .libPaths())) 
  
  library("SparkR", lib.loc="C/Users/alibaba555/Downloads/spark/R") # The path to the lib folder in the spark location 
  
  library(SparkR) 
  
  sparkR.session(master="local[*]",sparkConfig=list(spark.driver.memory="2g")*
  </code></pre>
  
  <p>Now execution starst with a message: </p>
  
  <blockquote>
    <p>Launching java with spark-submit command
    C/Users/alibaba555/Downloads/spark/bin/spark-submit2.cmd<br>
    sparkr-shell
    C:\Users\ALIBAB~1\AppData\Local\Temp\Rtmp00FFkx\backend_port1b90491e4622</p>
  </blockquote>
  
  <p>And finally after a few minutes it returns an error message: </p>
  
  <blockquote>
    <p>Error in sparkR.sparkContext(master, appName, sparkHome,
    sparkConfigMap,  :    JVM is not ready after 10 seconds</p>
  </blockquote>
  
  <p>Thanks!</p>