title: rJava install error "JAVA_HOME cannot be determined from the Registry"
body: <p>I am trying to load the rJava using the command:  </p>
  
  <pre><code> library(rJava)
  </code></pre>
  
  <p>But I get the following error:</p>
  
  <pre><code> Error : .onLoad failed in loadNamespace() for 'rJava', details:
     call: fun(libname, pkgname)
     error: JAVA_HOME cannot be determined from the Registry
   Error: package or namespace load failed for ‘rJava’
  </code></pre>
  
  <p>I tried reinstalling both the Java and the R program with the latest versions
  but still get these errors..
  May I know how I can resolve this? Thank you very much!</p>