Installing rJava on Ubuntu

Installing the rJava package on Ubuntu is not quite as simple as most other R packages. Some quick notes on how to do it.

  1. Install the Java Runtime Environment (JRE).
sudo apt-get install -y default-jre
  1. Install the Java Development Kit (JDK).
sudo apt-get install -y default-jdk
  1. Update where R expects to find various Java files.
sudo R CMD javareconf
  1. Install the package.
> install.packages("rJava")


Categorically Variable