At the terminal:
$ sudo apt-get install openjdk-7-*
$ sudo update-alternatives --config java
select openjdk 7 when prompted. then:
$ sudo R CMD javareconf
Then in R you can
install.packages('rJava')
without issue.
cf: http://askubuntu.com/questions/64329/how-to-replace-openjdk-6-with-openjdk-7 http://stackoverflow.com/questions/16438073/unable-to-install-rjava-in-r-3-0-in-ubuntu-13-04