title: How does one configure rJava on OSX to select the right JVM -- .jinit() failing
body: <p>I installed rJava by calling install.packages("rJava") -- no problems seen</p>
  
  <p>However when I call:</p>
  
  <pre><code>library(rJava)
  .jinit() 
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>JavaVM: requested Java version ((null)) not available. Using Java at "" instead.
  JavaVM: Failed to load JVM: /bundle/Libraries/libserver.dylib
  JavaVM FATAL: Failed to load the jvm library.
  Error in .jinit() : JNI_GetCreatedJavaVMs returned -1
  </code></pre>
  
  <p>I'm running OSX:</p>
  
  <pre><code>Darwin MBP-2 14.5.0 Darwin Kernel Version 14.5.0: Tue Sep  1 21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64 x86_64
  </code></pre>
  
  <p>I have the following Sun JDK's installed:</p>
  
  <pre><code>$ ls /Library/Java/JavaVirtualMachines/
  jdk1.7.0_79.jdk jdk1.8.0_65.jdk
  </code></pre>
  
  <p>Which Java is on my PATH:</p>
  
  <pre><code>$ which java
  /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home//bin/Java
  </code></pre>
  
  <p>I also have JavaHome defined as:</p>
  
  <pre><code>$ echo $JAVA_HOME
  /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/
  </code></pre>