Re: [R] Installing rJava fails

From: jcheng liu <jcheng.liu_at_gmail.com>
Date: Fri, 18 Mar 2011 13:30:22 -0400

 Dear Orvalho Augusto,
Thank so much for you response!

We had run R CMD javareconf -e, and even R CMD javareconf in administrator. Actually, we had install the JDK. And in the output, only the item of JNI cpp flages could not be detected(I listed output below). What does the item mean? What need we install?

Thanks,
Jiacheng

R CMD javareconf -e

Java interpreter : /usr/bin/java
Java version     : 1.6.0_24
Java home path   : /usr/java/jre1.6.0_24
Java compiler    : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar
Java library path:
$(JAVA_HOME)/lib/amd64/server:$(JAVA_HOME)/lib/amd64:$(JAVA_HOME)/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -L$(JAVA_HOME)/lib/amd64 -L$(JAVA_HOME)/../lib/amd64 -L/usr/java/packages/lib/amd64 -L/usr/lib64 -L/lib64 -L/lib -L/usr/lib -ljvm
JNI cpp flags :

The following Java variables have been exported: JAVA_HOME JAVA JAVAC JAVAH JAR JAVA_LIBS JAVA_CPPFLAGS JAVA_LD_LIBRARY_PATH Runnig: /bin/tcsh

On 3/18/2011 12:53 PM, Orvalho Augusto wrote:

Run
R CMD javareconf -e

as the being suggest by the output. That will try to guess where is Java. Or you can install the JDK_HOME and JAVA_HOME variables.

Good luck.
Caveman

 On Fri, Mar 18, 2011 at 4:39 PM, jcheng liu <jcheng.liu_at_gmail.com> wrote:

> Dear all,
> Installing rJava fails. The message was listed below. I wonder why cpp flag
> could not be detected, although I had installed. Thanks!!!
> -Jiacheng
>
> R CMD INSTALL rJava_0.9-0.tar.gz
> * installing to library
> ‘/data1/mri_researchers/wexler_data/jiacheng/R-2.12.0/library’
> * installing *source* package ‘rJava’ ...
> checking for gcc... gcc -std=gnu99
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc -std=gnu99 accepts -g... yes
> checking for gcc -std=gnu99 option to accept ISO C89... none needed
> checking how to run the C preprocessor... gcc -std=gnu99 -E
> checking for grep that handles long lines and -e... /bin/grep
> checking for egrep... /bin/grep -E
> checking for ANSI C header files... yes
> checking for sys/wait.h that is POSIX.1 compatible... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking for string.h... (cached) yes
> checking sys/time.h usability... yes
> checking sys/time.h presence... yes
> checking for sys/time.h... yes
> checking for unistd.h... (cached) yes
> checking for an ANSI C-conforming const... yes
> checking whether time.h and sys/time.h may both be included... yes
> configure: checking whether gcc -std=gnu99 supports static inline...
> yes
> checking whether setjmp.h is POSIX.1 compatible... yes
> checking whether sigsetjmp is declared... yes
> checking whether siglongjmp is declared... yes
> checking Java support in R... present:
> interpreter : '/usr/bin/java'
> archiver : '/usr/bin/jar'
> compiler : '/usr/bin/javac'
> header prep.: '/usr/bin/javah'
> cpp flags : ''
> java libs : '-L/usr/java/jre1.6.0_24/lib/amd64/server
> -L/usr/java/jre1.6.0_24/lib/amd64 -L/usr/java/jre1.6.0_24/../lib/amd64
> -L/usr/java/packages/lib/amd64 -L/usr/lib64 -L/lib64 -L/lib -L/usr/lib
> -ljvm'
> configure: error: One or more Java configuration variables are not set.
> Make sure R is configured with full Java support (including JDK). Run
> R CMD javareconf
> as root to add Java support to R.
>
> If you don't have root privileges, run
> R CMD javareconf -e
> to set all Java-related variables and then install rJava.
>
> ERROR: configuration failed for package ‘rJava’
> * removing ‘/R-2.12.0/library/rJava’
>
> [[alternative HTML version deleted]]
>
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 18 Mar 2011 - 21:06:55 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 18 Mar 2011 - 21:20:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive