[R] reconfiguring R to use Java 1.6 on OS X

Rajarshi Guha rajarshi.guha at gmail.com
Mon Jan 11 09:53:58 CET 2010


Hi, I'm running R 2.9.0 on OS X Tiger (10.5.8). When I use rJava I see
that it is using the 1.5.0 JRE. When I tried to reconfigure R to use
the 1.6 JDK that I have installed, I did

sudo R CMD javareconf

and I get

Java interpreter : /usr/bin/java
Java version     : 1.5.0_16
Java home path   :
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
Java compiler    : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar
Java library path:
JNI linker flags : -framework JavaVM
JNI cpp flags    : -I$(JAVA_HOME)/include

Updating Java configuration in /Library/Frameworks/R.framework/Resources
sed: -e: No such file or directory
sed: s|JAVA_CPPFLAGS =.\{0,\}|JAVA_CPPFLAGS =
-I$(JAVA_HOME)/include|g: No such file or directory
sed: -e: No such file or directory
sed: s|JAVA_CPPFLAGS =.\{0,\}|JAVA_CPPFLAGS =
-I$(JAVA_HOME)/include|g: No such file or directory
Done.

While it is looking at /usr/bin/java, when I manually run

/usr/bin/java -version

I get

java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode)

How could I get R to use the 1.6 JDK rather than the 1.5 JDK?

Thanks

-- 
Rajarshi Guha
NIH Chemical Genomics Center



More information about the R-help mailing list