title: rJava failed to install on ubuntu server hosting shiny/rstudio
body: <p>I am trying to run my shiny app on a ubuntu server hosting free version of rstudio(DigitalOcean, in case you are wondering), and for some reason I cannot install or open the rJava package. I have tried the common solutions online such as <code>apt-get install r-cran-rjava</code>and I have also did <code>sudo update-java-alternatives -s java-1.7.0-openjdk-amd64</code> and <code>sudo R CMD javareconf</code>, but nothing seems to work. Below is my error message in R when trying to load rJava:</p>
  
  <pre><code>    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 '/home/shushufang18/R/x86_64-pc-linux-gnu-library/3.4/rJava/libs/rJava.so':
      libjvm.so: cannot open shared object file: No such file or directory
  </code></pre>
  
  <p>Here is my java version:</p>
  
  <pre><code>  root@shushufang18-fiche:~# java -version
    java version "1.7.0_131"
    OpenJDK Runtime Environment (IcedTea 2.6.9) (7u131-2.6.9-0ubuntu0.14.04.2)
    OpenJDK 64-Bit Server VM (build 24.131-b00, mixed mode)
  </code></pre>
  
  <p>Here is my R version:</p>
  
  <pre><code> $platform
   [1] "x86_64-pc-linux-gnu"
  
   $arch
   [1] "x86_64"
  
   $os
   [1] "linux-gnu"
  
   $system
   [1] "x86_64, linux-gnu"
  
   $status
   [1] ""
  
   $major
   [1] "3"
  
   $minor
   [1] "4.1"
  
   $year
   [1] "2017"
  
   $month
   [1] "06"
  
   $day
   [1] "30"
  
   $`svn rev`
   [1] "72865"
  
   $language
   [1] "R"
  
   $version.string
   [1] "R version 3.4.1 (2017-06-30)"
  
   $nickname
   [1] "Single Candle"
  </code></pre>
  
  <p>Thank you!!!</p>