[R-sig-Debian] Trouble compiling Java-based R packages

Peter Muhlberger pmuhl1848 at gmail.com
Tue Jun 8 20:51:37 CEST 2010


Hi folks:  I guess my earlier posting was too involved, so let me try
to get to the essence of my problem.

I recently tried to compile JGR, rJava, etc. into my updated R.
First, I ran: R CMD javareconf.  The output from that tells me that
"JAVA_HOME is not a valid path, ignoring" and the cpp flags are set to
nothing.  The javareconf fills most of the variables with references
to openjdk.  JAVA_HOME, as far as I can tell, points to a properly
installed copy of Sun Java.  When I run update.packages(checkBuilt=T)
with this, it unsurprisingly tells me that "One or more Java
configuration variables are not set" and all of my Java based programs
fail to compile.

I've tried switching the default Java to the Sun version using "sudo
update-alternatives --config java".  Now, javareconf fills in the cpp
flag and variables point to the Sun version, though I still get the
error msg that JAVA_HOME is not a valid path (though javareconf sets
the home path to: /usr/lib/jvm/java-6-sun-1.6.0.20/jre).  When I try
to compile rJava, I get the error: rJava, "JNI types differ from the
native type."

Does anyone have any thoughts on how to fix this?  Alternatively, is
there somewhere I can report these problems so they might get fixed in
future versions?  I suspect I can't be the only person having these
problems.

Cheers, Peter



More information about the R-SIG-Debian mailing list