unable to compile JNI program rJava

The jni.h file is part of JDK installation. You probably don't have Java JDK installed correctly. Download Oracle Java from here, or use your package manager.

If you have Java JDK already installed, set JAVA_HOME environment variable to point to the JDK directory.


I know this is closed but I'm adding my solution for completeness. In effect I had the same problem and all was correctly installed. I had also run the

sudo R CMD javareconf

for system wide setting. What I needed was for it to work for my user. And in this case you should run

R CMD javareconf -e

without sudo and with appended -e.

Worked for me. :)

Tags:

Java

R