Re: JGR with free java (was: GUI for R)
Egon Willighagen writes:
> cc: debian-java -> I need a bit of help here, see below
> On Wednesday 11 October 2006 15:48, Dirk Eddelbuettel wrote:
> > | > Unfortunately, JGR is still somewhat outside Debian as it wants Sun's
> > | > Java JDK so I don't think I'll ever package it directly. Now, if
> > | > someone wanted to outside of Debian ... In fact, the CRAN maintainers
> > | > mention that idea. Maybe one day.
> > |
> > | Did you try it with JamVM/Classpath? I will have a go at that in running
> > | JGR, and report problems with the Classpath team.
> > I do not use Java myself, so I wouldn't be the one to try this. It would
> > be nice if someone like you with R and Java clues coud try it. I honestly
> > do not know what is involved but I have the suspicion that it is no cake
> > walk.
> I've found out that it now actually is a package on CRAN, and installs fine,
> and really just depends on rJava for the Java binding. (JGR and rJava are
> downloaded as source tar.gz from ).
> I had a brief go at installing rJava against GIJ:
> $ JAVA_HOME=/usr/lib/jvm/java-1.4.2-gcj-4.1-184.108.40.206 R CMD
> INSTALL --library=/usr/local/lib/R/site-library rJava_0.4-11.tar.gz
> (R comes with the package r-base).
> You need to have java-gcj-compat-dev and libgcj-bc installed.
> But it fails because of this call:
> /usr/lib/jvm/java-1.4.2-gcj-4.1-220.127.116.11/bin/javac -target 1.4 -source
> 1.4 -target 1.4 -source 1.4 -classpath src/JRI.jar -d examples
> Note the duplicate '-target 1.4 -source 1.4', which is OK for the Sun javac,
> but breaks compiling with gcj 4.1 javac.
What is javac here? If it's a link to ecj, which it should be, this
> A workaround is not compiling the examples, which can be done by modifying
> (after tar zxvf) the rJava/jri/Makefile.all, and make it look like:
> examples/%.class: examples/%.java src/JRI.jar
> #$(JAVAC) $(JFLAGS) -classpath src/JRI.jar -d examples $<
> Then the package installs.
> However, running it still fails with this error:
> $ R
> and then on the R command line:
> > library(rJava)
> which fails with:
> Error in dyn.load(x, as.logical(local), as.logical(now)) :
> unable to load shared
> library '/usr/local/lib/R/site-library/rJava/libs/rJava.so':
> libjvm.so: cannot open shared object file: No such file or directory
> Error in library(rJava) : .First.lib failed for 'rJava'
> Not sure what else I can/should try now. Ideas?
Did you install rJava.so? If so, where is it? Did it even get built?