title: Trouble installing rJava on Mac ; trouble with JNI data types
body: <h1>RESOLVED!!</h1>
  
  <p>See my solution below, in case this question helps others in the future.</p>
  
  <h1>Error</h1>
  
  <p>As the title described, it it failing for me.  The error I'm receiving, when I attempt to <code>install.packages('rJava')</code> from inside R is (with some preceding good checks):</p>
  
  <pre><code>checking whether JNI programs can be compiled... yes
  checking JNI data types... configure: error: One or more JNI types differ from the corresponding native type. You may need to use non-standard compiler flags or a different compiler in order to fix this.
  ERROR: configuration failed for package ‘rJava’
  * removing ‘/usr/local/lib/R/3.2/site-library/rJava’
  </code></pre>
  
  <hr>
  
  <h1>Fix Attempts</h1>
  
  <p>I have checked and tried the following resolutions, none of which worked for me:</p>
  
  <ul>
  <li><p><a href="https://stackoverflow.com/questions/26061726/compile-rjava-on-mac-for-java-1-7?rq=1">sudo R CMD javareconf</a></p></li>
  <li><p><a href="https://stackoverflow.com/questions/13610293/how-to-get-rjava-0-9-3-to-work-on-os-x-10-7-4-with-oracle-java-1-7">more detailed sudo R CMD javareconf</a></p></li>
  <li><p><a href="https://stackoverflow.com/questions/18530601/install-rjava-configure-error-one-or-more-jni-types-differ-from-the-corresp"><code>export JAVA_HOME</code></a>, however in this case, I did not do the LD_LIBRARY_PATH, as it did not seem relevant to a Mac.</p></li>
  </ul>
  
  <p>No such luck, with any of these attempts.</p>
  
  <hr>
  
  <p>I <strong>had</strong> previously had <code>rJava</code> (and <code>RJDBC</code>) installed properly.</p>
  
  <p>[Edit:  I later found out, the actual problem was upgrading to OS X 10.11, El Capitan.]</p>
  
  <hr>
  
  <h1>Configuration</h1>
  
  <pre><code>$ java -version
  java version "1.8.0_45"
  
  &gt; R.Version()
  $platform
  [1] "x86_64-apple-darwin15.0.0"
  $version.string
  [1] "R version 3.2.2 (2015-08-14)"
  </code></pre>
  
  <p>Mac OS itself:</p>
  
  <pre><code>System Version: OS X 10.11.1 (15B42)
  </code></pre>
  
  <hr>