JGR with free java (was: GUI for R)
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
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-22.214.171.124 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-126.96.36.199/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.
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:
and then on the R command line:
which fails with:
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared
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?
Cologne University Bioinformatics Center (CUBIC)
- GUI for R
- From: Cristiano Nattèro <firstname.lastname@example.org>
- Re: GUI for R
- From: Egon Willighagen <email@example.com>
- Re: GUI for R
- From: Dirk Eddelbuettel <firstname.lastname@example.org>