Dear Orvalho Augusto,

Thanks for your response. But we met a new problem. We set as waht you said
in the last email and run installing agian. But we got the error:
rJava.h:22:17: error: jni.h: No such file or directory.
Actually we had found "jni.h" under {JAVA_HOME}/../include and the path had
been set in "JNI linker flags". So we so confuded.

Thanks,
Jiacheng

The below is the detail information.


commandline $ R CMD INSTALL rJava_0.9-0.tar.gz

output:

* 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   : '-I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux'
java libs   : '-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'
checking whether JNI programs can be compiled... yes
checking JNI data types... ok
checking whether JRI should be compiled (autodetect)... no
checking whether debugging output should be enabled... no
checking whether memory profiling is desired... no
checking whether threads support is requested... no
checking whether callbacks support is requested... no
checking whether JNI cache support is requested... no
checking whether JRI is requested... no
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating R/zzz.R
config.status: creating src/config.h
** libs
gcc -std=gnu99
-I/data1/mri_researchers/wexler_data/jiacheng/R-2.12.0/include -I.
-I/usr/java/jre1.6.0_24/../include -I/usr/java/jre1.6.0_24/../include/linux
-I/usr/local/include    -fpic  -g -O2 -c Rglue.c -o Rglue.o
In file included from Rglue.c:2:
rJava.h:22:17: error: jni.h: No such file or directory
In file included from Rglue.c:2:
rJava.h:123: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘*’ token
rJava.h:125: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘*’ token
rJava.h:126: error: expected ‘)’ before ‘*’ token
rJava.h:127: error: expected ‘)’ before ‘*’ token
rJava.h:129: warning: parameter names (without types) in function
declaration
rJava.h:130: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘getSimpleClassNames’
rJava.h:131: warning: parameter names (without types) in function
declaration
rJava.h:135: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘*’ token
rJava.h:138: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘javaStringClass’
rJava.h:139: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘javaObjectClass’
rJava.h:140: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘javaClassClass’
rJava.h:141: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘javaFieldClass’
rJava.h:142: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘rj_RJavaTools_Class’
rJava.h:144: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘mid_forName’
rJava.h:145: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘mid_getName’
rJava.h:146: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘mid_getSimpleName’
rJava.h:147: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘mid_getSuperclass’
rJava.h:148: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘mid_getType’
rJava.h:149: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘mid_getField’
rJava.h:150: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘mid_rj_getSimpleClassNames’
rJava.h:152: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘mid_RJavaTools_getFieldTypeName’
rJava.h:155: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘rj_RJavaImport_Class’
rJava.h:156: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘mid_RJavaImport_getKnownClasses’
rJava.h:157: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘mid_RJavaImport_lookup’
rJava.h:158: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘mid_RJavaImport_exists’
rJava.h:175: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘getImporterReference’
rJava.h:181: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘clClassLoader’
rJava.h:182: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘oClassLoader’
rJava.h:185: error: expected ‘)’ before ‘*’ token
rJava.h:186: error: expected ‘)’ before ‘*’ token
rJava.h:187: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘R1par2jvalue’
rJava.h:190: error: expected ‘)’ before ‘*’ token
rJava.h:191: error: expected ‘)’ before ‘*’ token
rJava.h:194: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘callToString’
rJava.h:197: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘createObject’
rJava.h:198: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘findClass’
rJava.h:199: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘objectClass’
rJava.h:201: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘newDoubleArray’
rJava.h:202: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘newIntArray’
rJava.h:203: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘newBooleanArrayI’
rJava.h:204: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘newString’
rJava.h:205: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘newCharArrayI’
rJava.h:206: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘newShortArrayI’
rJava.h:207: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘newFloatArrayD’
rJava.h:208: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘newLongArrayD’
rJava.h:209: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘newByteArray’
rJava.h:210: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘newByteArrayI’
rJava.h:212: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘makeGlobal’
rJava.h:213: error: expected ‘)’ before ‘*’ token
rJava.h:214: error: expected ‘)’ before ‘*’ token
rJava.h:216: error: expected ‘)’ before ‘*’ token
rJava.h:218: error: expected ‘)’ before ‘*’ token
rJava.h:220: error: expected ‘)’ before ‘*’ token
Rglue.c: In function ‘JRefObjectFinalizer’:
Rglue.c:79: error: ‘JNIEnv’ undeclared (first use in this function)
Rglue.c:79: error: (Each undeclared identifier is reported only once
Rglue.c:79: error: for each function it appears in.)
Rglue.c:79: error: ‘env’ undeclared (first use in this function)
Rglue.c:79: warning: implicit declaration of function ‘getJNIEnv’
Rglue.c:80: error: ‘jobject’ undeclared (first use in this function)
Rglue.c:80: error: expected ‘;’ before ‘o’
Rglue.c:95: error: ‘o’ undeclared (first use in this function)
Rglue.c:98: warning: implicit declaration of function ‘releaseGlobal’
Rglue.c: At top level:
Rglue.c:104: error: expected ‘)’ before ‘*’ token
Rglue.c: In function ‘deserializeSEXP’:
Rglue.c:151: error: ‘JNIEnv’ undeclared (first use in this function)
Rglue.c:151: error: ‘env’ undeclared (first use in this function)
Rglue.c:152: error: ‘clClassLoader’ undeclared (first use in this function)
Rglue.c:152: error: ‘oClassLoader’ undeclared (first use in this function)
Rglue.c:153: error: ‘jbyteArray’ undeclared (first use in this function)
Rglue.c:153: error: expected ‘;’ before ‘ser’
Rglue.c:154: error: ‘ser’ undeclared (first use in this function)
Rglue.c:155: error: ‘jmethodID’ undeclared (first use in this function)
Rglue.c:155: error: expected ‘;’ before ‘mid’
Rglue.c:156: error: ‘mid’ undeclared (first use in this function)
Rglue.c:157: error: ‘jobject’ undeclared (first use in this function)
Rglue.c:157: error: expected ‘;’ before ‘res’
Rglue.c:158: error: ‘res’ undeclared (first use in this function)
Rglue.c:159: error: expected ‘;’ before ‘go’
Rglue.c:161: error: ‘go’ undeclared (first use in this function)
Rglue.c:173: warning: implicit declaration of function ‘releaseObject’
Rglue.c: At top level:
Rglue.c:214: error: expected ‘)’ before ‘*’ token
Rglue.c:380: error: expected ‘)’ before ‘*’ token
Rglue.c:390: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘R1par2jvalue’
Rglue.c: In function ‘RcallMethod’:
Rglue.c:410: error: ‘jvalue’ undeclared (first use in this function)
Rglue.c:410: error: expected ‘;’ before ‘jpar’
Rglue.c:411: error: ‘jobject’ undeclared (first use in this function)
Rglue.c:411: error: expected ‘;’ before ‘tmpo’
Rglue.c:412: error: expected ‘;’ before ‘o’
Rglue.c:414: error: ‘jmethodID’ undeclared (first use in this function)
Rglue.c:414: error: expected ‘;’ before ‘mid’
Rglue.c:415: error: ‘jclass’ undeclared (first use in this function)
Rglue.c:415: error: expected ‘;’ before ‘cls’
Rglue.c:416: error: ‘JNIEnv’ undeclared (first use in this function)
Rglue.c:416: error: ‘env’ undeclared (first use in this function)
Rglue.c:424: error: ‘o’ undeclared (first use in this function)
Rglue.c:440: error: ‘cls’ undeclared (first use in this function)
Rglue.c:440: warning: implicit declaration of function ‘findClass’
Rglue.c:442: warning: implicit declaration of function ‘objectClass’
Rglue.c:467: warning: implicit declaration of function ‘Rpar2jvalue’
Rglue.c:467: error: ‘jpar’ undeclared (first use in this function)
Rglue.c:467: error: ‘tmpo’ undeclared (first use in this function)
Rglue.c:471: error: ‘mid’ undeclared (first use in this function)
Rglue.c:475: warning: implicit declaration of function ‘checkExceptionsX’
Rglue.c:481: warning: implicit declaration of function ‘Rfreejpars’
Rglue.c:542: error: ‘jlong’ undeclared (first use in this function)
Rglue.c:542: error: expected ‘;’ before ‘r’
Rglue.c:546: error: ‘r’ undeclared (first use in this function)
Rglue.c:555: error: ‘jshort’ undeclared (first use in this function)
Rglue.c:555: error: expected ‘;’ before ‘r’
Rglue.c:568: error: ‘jboolean’ undeclared (first use in this function)
Rglue.c:568: error: expected ‘;’ before ‘r’
Rglue.c:607: error: expected ‘;’ before ‘r’
Rglue.c:620: warning: implicit declaration of function ‘j2SEXP’
Rglue.c:620: warning: assignment makes pointer from integer without a cast
Rglue.c: In function ‘RcallSyncMethod’:
Rglue.c:634: error: ‘jobject’ undeclared (first use in this function)
Rglue.c:634: error: expected ‘;’ before ‘o’
Rglue.c:635: error: ‘JNIEnv’ undeclared (first use in this function)
Rglue.c:635: error: ‘env’ undeclared (first use in this function)
Rglue.c:642: error: ‘o’ undeclared (first use in this function)
Rglue.c:650: error: ‘JNI_OK’ undeclared (first use in this function)
Rglue.c: In function ‘RcreateObject’:
Rglue.c:671: error: ‘jvalue’ undeclared (first use in this function)
Rglue.c:671: error: expected ‘;’ before ‘jpar’
Rglue.c:672: error: ‘jobject’ undeclared (first use in this function)
Rglue.c:672: error: expected ‘;’ before ‘tmpo’
Rglue.c:673: error: expected ‘;’ before ‘o’
Rglue.c:674: error: ‘JNIEnv’ undeclared (first use in this function)
Rglue.c:674: error: ‘env’ undeclared (first use in this function)
Rglue.c:690: error: ‘jpar’ undeclared (first use in this function)
Rglue.c:690: error: ‘tmpo’ undeclared (first use in this function)
Rglue.c:704: error: ‘o’ undeclared (first use in this function)
Rglue.c:704: warning: implicit declaration of function ‘createObject’
Rglue.c:723: warning: return makes pointer from integer without a cast
Rglue.c: At top level:
Rglue.c:727: error: expected ‘)’ before ‘*’ token
Rglue.c:758: error: expected ‘)’ before ‘*’ token
Rglue.c:777: error: expected ‘)’ before ‘*’ token
Rglue.c:789: error: expected ‘)’ before ‘*’ token
Rglue.c:808: error: expected ‘)’ before ‘*’ token
Rglue.c:831: error: expected ‘)’ before ‘*’ token
Rglue.c: In function ‘RcreateArray’:
Rglue.c:857: error: ‘JNIEnv’ undeclared (first use in this function)
Rglue.c:857: error: ‘env’ undeclared (first use in this function)
Rglue.c:864: error: ‘jbyteArray’ undeclared (first use in this function)
Rglue.c:864: error: expected ‘;’ before ‘a’
Rglue.c:865: error: ‘a’ undeclared (first use in this function)
Rglue.c:866: warning: implicit declaration of function ‘new_jarrayRef’
Rglue.c:866: warning: return makes pointer from integer without a cast
Rglue.c:868: error: ‘jcharArray’ undeclared (first use in this function)
Rglue.c:868: error: expected ‘;’ before ‘a’
Rglue.c:870: warning: return makes pointer from integer without a cast
Rglue.c:872: error: ‘jintArray’ undeclared (first use in this function)
Rglue.c:872: error: expected ‘;’ before ‘a’
Rglue.c:874: warning: return makes pointer from integer without a cast
Rglue.c:880: error: ‘jfloatArray’ undeclared (first use in this function)
Rglue.c:880: error: expected ‘;’ before ‘a’
Rglue.c:882: warning: return makes pointer from integer without a cast
Rglue.c:884: error: ‘jlongArray’ undeclared (first use in this function)
Rglue.c:884: error: expected ‘;’ before ‘a’
Rglue.c:886: warning: return makes pointer from integer without a cast
Rglue.c:888: error: ‘jdoubleArray’ undeclared (first use in this function)
Rglue.c:888: error: expected ‘;’ before ‘a’
Rglue.c:890: warning: return makes pointer from integer without a cast
Rglue.c:895: error: ‘jobjectArray’ undeclared (first use in this function)
Rglue.c:895: error: expected ‘;’ before ‘a’
Rglue.c:899: error: ‘jobject’ undeclared (first use in this function)
Rglue.c:899: error: expected ‘;’ before ‘so’
Rglue.c:900: error: ‘so’ undeclared (first use in this function)
Rglue.c:904: warning: return makes pointer from integer without a cast
Rglue.c:909: error: ‘jbooleanArray’ undeclared (first use in this function)
Rglue.c:909: error: expected ‘;’ before ‘a’
Rglue.c:911: warning: return makes pointer from integer without a cast
Rglue.c:916: error: ‘jclass’ undeclared (first use in this function)
Rglue.c:916: error: expected ‘;’ before ‘ac’
Rglue.c:933: error: ‘ac’ undeclared (first use in this function)
Rglue.c:953: error: expected ‘;’ before ‘a’
Rglue.c:955: error: ‘javaObjectClass’ undeclared (first use in this
function)
Rglue.c:960: error: expected ‘;’ before ‘o’
Rglue.c:965: error: ‘o’ undeclared (first use in this function)
Rglue.c:971: warning: return makes pointer from integer without a cast
Rglue.c:976: error: expected ‘;’ before ‘a’
Rglue.c:978: warning: return makes pointer from integer without a cast
Rglue.c: In function ‘RpollException’:
Rglue.c:988: error: ‘JNIEnv’ undeclared (first use in this function)
Rglue.c:988: error: ‘env’ undeclared (first use in this function)
Rglue.c:989: error: ‘jthrowable’ undeclared (first use in this function)
Rglue.c:989: error: expected ‘;’ before ‘t’
Rglue.c:991: error: ‘t’ undeclared (first use in this function)
Rglue.c: In function ‘RclearException’:
Rglue.c:999: error: ‘JNIEnv’ undeclared (first use in this function)
Rglue.c:999: error: ‘env’ undeclared (first use in this function)
Rglue.c: In function ‘RthrowException’:
Rglue.c:1020: error: ‘JNIEnv’ undeclared (first use in this function)
Rglue.c:1020: error: ‘env’ undeclared (first use in this function)
Rglue.c:1021: error: ‘jthrowable’ undeclared (first use in this function)
Rglue.c:1021: error: expected ‘;’ before ‘t’
Rglue.c:1032: error: ‘t’ undeclared (first use in this function)
make: *** [Rglue.o] Error 1
ERROR: compilation failed for package ‘rJava’
* removing ‘/R-2.12.0/library/rJava’


On Fri, Mar 18, 2011 at 4:59 PM, Orvalho Augusto <orvaquim@gmail.com> wrote:

> It seems that you are not alone with that error  (
> http://stackoverflow.com/questions/3311940/r-rjava-package-install-failing
> ).
>
> Defining only JAVA_HOME he would find everything else.
>
> Backup your /etc/R before do this.
>
> Running the R CMD javareconf is to place variables like this in
> /etc/R/Makeconf (hope the experts corect me)
> JAR = /usr/bin/jar
> JAVA = /usr/bin/java
> JAVAC = /usr/bin/javac
> JAVAH = /usr/bin/javah
> JAVA_HOME = /usr/lib/jvm/java-6-sun-1.6.0.24/jre
> JAVA_LD_LIBRARY_PATH =
> $(JAVA_HOME)/lib/i386/server:$(JAVA_HOME)/lib/i386:$(JAVA_HOME)/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
> JAVA_LIBS = -L$(JAVA_HOME)/lib/i386/server -L$(JAVA_HOME)/lib/i386
> -L$(JAVA_HOME)/../lib/i386 -L/usr/java/packages/lib/i386 -L/lib -L/usr/lib
> -ljvm
> JAVA_CPPFLAGS = -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux
>
> Add it manually. Pay attention the amd64 versus my i386. Place on variable
> sections
>
> Edit /etc/R/ldpahs place before if test -n...
> : ${JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.24/jre}
> :
> ${R_JAVA_LD_LIBRARY_PATH=${JAVA_HOME}/lib/i386/server:${JAVA_HOME}/lib/i386:${JAVA_HOME}/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib}
>
> Again correct with your paths.
>
> And try to install rJava.
>
> Caveman
>
>
>
> On Fri, Mar 18, 2011 at 7:30 PM, jcheng liu <jcheng.liu@gmail.com> wrote:
>
>>  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@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@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]]

