title: Using Rjava on Mac. Relevant library libjvm.dylib does not exist
body: <p>I cannot use R with Java on the Mac. There is a wealth of information on the web, including on Stack Overflow (e.g. <a href="https://stackoverflow.com/questions/30738974/rjava-load-error-in-rstudio-r-after-upgrading-to-osx-yosemite">rJava load error in RStudio/R after &quot;upgrading&quot; to OSX Yosemite</a>), but none of this helps me. The standard advice is to find the file libjvm.dylib, and to set up a link to this as follows;</p>
  
  <pre><code>sudo ln -f -s $(/usr/libexec/java_home)/jre/lib/server/libjvm.dylib /usr/local/lib
  </code></pre>
  
  <p>The problem is that I do not have the file libjvm.dylib anywhere on my system, despite repeatedly downloading the latest version of Java from Oracle.</p>
  
  <p>My Java home is as follows; /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home.</p>
  
  <p>The Java version is; java version "1.6.0_65"
  Java(TM) SE Runtime Environment (build 1.6.0_65-b14-468-11M4833)
  Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-468, mixed mode).</p>
  
  <p>The tree structure of my java home (directories only) is;</p>
  
  <p><a href="https://i.stack.imgur.com/aYRfS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aYRfS.png" alt="enter image description here"></a></p>
  
  <p>It looks completely different from the tree structure which I'm supposed to have, e.g. there is no 'jre' folder.</p>
  
  <p>Thanks in advance.</p>