[Quantian-general] Quantian and Java
Simon Urbanek
simon.urbanek at r-project.org
Sun Mar 19 16:46:54 UTC 2006
Hi Dirk,
On Mar 18, 2006, at 10:46 PM, Dirk Eddelbuettel wrote:
> | But I am having a problem with the rJava library for R (needed
> for JGR)
> | in Quantian_0.7.9.2. It seems to be a Java problem. I do library
> (JGR) or
> | library(rJava) and get:
> |
> | Error in dyn.load ...
> | unable to load ... rJava.so
> | libjvm.so: cannot open shared object file: No such file or directory
>
> I noticed that too post-release. However, the good news is that
> this seems
> to happen only when you start R directly, or via ESS, and can be
> circumvented
> (see below). I suspect that because nobody tells R (at run-time)
> where the
> Java libraries are, libjvw.so is not found.
>
It seems as if your R build is not Java-aware. All necessary paths
are set in the R script, so it works both in the shell and ESS if
compiled properly. R uses the same mechanism as rJava so you should
see the same output at configure time of R (i.e. whether Java support
is enabled and where Java lives). My guess is that you compiled R
before having Java installed and thus R didn't know about Java at
that time. In that case, you have to set LD_LIBRARY_PATH manually (it
still helps to run the configure script of R or JRI to see what the
correct path is).
The whole issue is quite messy, because Sun's Java moves around with
updates. We are working on a better solution that will allow you to
run something like `R CMD java-configure' to update the paths in an
already installed R - it will hopefully make it to the R 2.3 release.
Cheers,
Simon
More information about the Quantian-general
mailing list