title: rjava and java issue with r on mac os mojave issue
body: <p>I recently updated to the latest R version and Mojave.  I can't get Rjava to work anymore.  I tried reading the many topics on this, but I can't figure out what I am doing wrong...</p>
  
  <pre><code>Loading required package: rJava
  Error: package or namespace load failed for ‘rJava’:
   .onLoad failed in loadNamespace() for 'rJava', details:
    call: dyn.load(file, DLLpath = DLLpath, ...)
    error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rJava/libs/rJava.so':
    dlopen(/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/lib/server/libjvm.dylib
    Referenced from: /Library/Frameworks/R.framework/Versions/3.5/Resources/library/rJava/libs/rJava.so
    Reason: image not found
  Error: package ‘rJava’ could not be loaded
  </code></pre>
  
  enter this into terminal...
  
  <pre><code> /usr/libexec/java_home -V
  
  Matching Java Virtual Machines (2):
      10.0.1, x86_64: "Java SE 10.0.1"    /Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home
      1.8.0_171, x86_64:  "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home
  
  /Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home
  </code></pre>
  
  <p>When I run </p>
  
  <pre><code> sudo R CMD javareconf
  
  
  
  Java interpreter : /usr/bin/java
  Java version     : 10.0.1
  Java home path   : /Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home
  Java compiler    : /usr/bin/javac
  Java headers gen.: /usr/bin/javah
  Java archive tool: /usr/bin/jar
  System Java on macOS
  
  trying to compile and link a JNI program 
  detected JNI cpp flags    : -I/System/Library/Frameworks/JavaVM.framework/Headers
  detected JNI linker flags : -framework JavaVM
  x86_64-apple-darwin13.4.0-clang -I/anaconda3/lib/R/include -DNDEBUG -I/System/Library/Frameworks/JavaVM.framework/Headers  -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -I/anaconda3/include   -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/anaconda3/include -fdebug-prefix-map==/usr/local/src/conda/- -fdebug-prefix-map==/usr/local/src/conda-prefix  -c conftest.c -o conftest.o
  conftest.c:1:10: fatal error: 'jni.h' file not found
  #include &lt;jni.h&gt;
           ^~~~~~~
  1 error generated.
  make: *** [conftest.o] Error 1
  Unable to compile a JNI program, ignoring this though as you may not want to compile anything here
  .. this is an Anaconda Distribution and conda-forge customization whereby env activation causes us
  .. to call R CMD javareconf in order to dynamically detect a JDK that may be in that env. The fact
  .. that we prohibit setting LD_LIBRARY_PATH is also somewhat responsible for us needing to do this
  .. because ${R_HOME}/etc/ldpaths is the normal way that R dynamically finds shared libraries. This
  .. is what would, in upstream R, set LD_LIBRARY_PATH. AD cannot set this as it causes all sorts of
  .. issues with DT_RUNPATH / DT_RPATH on various distributions.
  
  
  JAVA_HOME        : /Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home
  Java library path: 
  JNI cpp flags    : -I/System/Library/Frameworks/JavaVM.framework/Headers
  JNI linker flags : -framework JavaVM
  Updating Java configuration in /anaconda3/lib/R
  Done.
  </code></pre>
  
  <p>Can someone tell me what I have to do?  I'm sure this has been repeated many times and is obvious but I cant figure it out or do it correctly.</p>