I recently set up a Ubuntu 16.04 VM and installed Microsoft R Server together with a couple of Ubuntu packages (e.g. Openjdk-8-jdk and r-cran-rjava) on it. I encountered a problem when installing rJava package. Apr 12, 2012 - How can I get R to find/recognize my Java installation? I am running R-2.15.0. Waichler@snow> sudo R CMD javareconf. Java interpreter.
sudo R CMD javareconf
When I run sudo R CMD javareconf,the result tells me that jni.h is not found. I install Java and Hadoop and I want to install R packages 'rJava'.But When I install 'rJava' and the Rstudio also run error.First, I want to know how to solve sudo R CMD javareconf and find the jni.h file.
RainbowRainbow
2 Answers
The compiler flags suggest you are on Debian or Ubuntu. You could then use what is use by the R package itself for its build:
The keys is 'jdk' -- development kit, not just 'jre' aka run-time environment.
But if you just want the rJava package, try
Dirk EddelbuettelDirk Eddelbuettel
Update Nov 2018:
If you are on Mac OS, you can download the JDK here.
Do NOT download the java runtime environment wrong: JRE - often cause for problems.
Agile BeanAgile Bean