Re: [R] Can't get R to recognize Java for rJava installation
Also, remember when you use it to connect to a DB: Teradata or Orcale or MySQLmake sure you have JRE running and relevant DB jars are loaded in class path. .jclassPath() => to check class paths .jinit() => to run JRE -- View this message in context: http://r.789695.n4.nabble.com/Can-t-get-R-to-recognize-Java-for-rJava-installation-tp4553023p4649778.html Sent from the R help mailing list archive at Nabble.com. __ 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.
Re: [R] Can't get R to recognize Java for rJava installation
I had similar issue. This worked for me: get in as root: export JAVA_HOME="/usr/java/jdk1.6.0_37/jre" export PATH=$PATH:$JAVA_HOME/bin ln -sf usr/java/default/bin/javah /usr/bin/javah ln -sf usr/java/default/bin/javap /usr/bin/javap (basically make sure you have all java* binaries that you have under usr/java/default/bin/ are also under /usr/bin/ as link. Follow how javac is placed under /usr/bin/) R CMD javareconf now make sure you still have the JAVA_HOME and PATH variable intact as you set it. Go to R and try installing "rJava" package, it should work. -- View this message in context: http://r.789695.n4.nabble.com/Can-t-get-R-to-recognize-Java-for-rJava-installation-tp4553023p4649363.html Sent from the R help mailing list archive at Nabble.com. __ 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.
Re: [R] Can't get R to recognize Java for rJava installation
Milan, Merci. I did find the javah file and put it in /usr/bin, where R can now find it. However, I still get a similar error message when trying to install rJava, i.e. configure: error: One or more Java configuration variables are not set. The only field that doesn't have a value now are the cpp flags: cpp flags : '' Could this be the problem now? How can I set those, and what value should I give? Scott Waichler > So I guess you need to find out what package provides this file on your > distribution (which you did not mention). First check the file is > currently not present. __ 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.
Re: [R] Can't get R to recognize Java for rJava installation
Le jeudi 12 avril 2012 à 13:41 -0700, Waichler, Scott R a écrit : > Hi, I am unable to install the package rJava. I tried doing what the output > suggests, but it doesn't help. How can I get R to find/recognize my Java > installation? I am running R-2.15.0. > > waichler@snow> sudo R CMD javareconf > Java interpreter : /usr/bin/java > Java version : 1.6.0_22 > Java home path : /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre > Java compiler: /usr/bin/javac > Java headers gen.: > Java archive tool: /usr/bin/jar > Java library path: > $(JAVA_HOME)/lib/i386/client:$(JAVA_HOME)/lib/i386:$(JAVA_HOME)/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib > JNI linker flags : -L$(JAVA_HOME)/lib/i386/client -L$(JAVA_HOME)/lib/i386 > -L$(JAVA_HOME)/../lib/i386 -L/usr/java/packages/lib/i386 -L/lib -L/usr/lib > -ljvm > JNI cpp flags: > > Updating Java configuration in /usr/lib/R > Done. > > > install.packages(c("rJava"), dependencies = T, repos = > > "http://cran.fhcrc.org";) > . . . > 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.: '' > cpp flags : '' > java libs : '-L/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/client > -L/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386 > -L/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/../lib/i386 > -L/usr/java/packages/lib/i386 -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 Æ/usr/lib/R/library/rJavaÇ It looks like you need "Java headers gen." to be set. Here on my box (Fedora 16) it is: Java headers gen.: /usr/bin/javah So I guess you need to find out what package provides this file on your distribution (which you did not mention). First check the file is currently not present. Cheers __ 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.
[R] Can't get R to recognize Java for rJava installation
Hi, I am unable to install the package rJava. I tried doing what the output suggests, but it doesn't help. How can I get R to find/recognize my Java installation? I am running R-2.15.0. waichler@snow> sudo R CMD javareconf Java interpreter : /usr/bin/java Java version : 1.6.0_22 Java home path : /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre Java compiler: /usr/bin/javac Java headers gen.: Java archive tool: /usr/bin/jar Java library path: $(JAVA_HOME)/lib/i386/client:$(JAVA_HOME)/lib/i386:$(JAVA_HOME)/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib JNI linker flags : -L$(JAVA_HOME)/lib/i386/client -L$(JAVA_HOME)/lib/i386 -L$(JAVA_HOME)/../lib/i386 -L/usr/java/packages/lib/i386 -L/lib -L/usr/lib -ljvm JNI cpp flags: Updating Java configuration in /usr/lib/R Done. > install.packages(c("rJava"), dependencies = T, repos = > "http://cran.fhcrc.org";) . . . 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.: '' cpp flags : '' java libs : '-L/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/client -L/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386 -L/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/../lib/i386 -L/usr/java/packages/lib/i386 -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 Æ/usr/lib/R/library/rJavaÇ Thanks, Scott Waichler Senior Research Scientist Hydrology Group, Energy & Environment Directorate Pacific Northwest National Laboratory __ 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.