I am using Red Hat 5, and unable to install rJava
Package
I ran the following command:
$ R CMD javareconf -e
I get the following error:-
trying to compile and link a JNI program detected JNI cpp flags :
detected JNI linker flags :
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include
-fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fpic -fPIC -c conftest.c -o conftest.oconftest.c:1:17: fatal error: jni.h: No such file or directory
compilation terminated.
make: *** [conftest.o] Error 1
Unable to compile a JNI program
java -version is below:-
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mod
JAVA_HOME = /usr/java/jdk1.8.0_91/jre
Can anyone please help me to compile JNI Program
yum install java-1.8*
this helped in solving above error. – Santosh Garole