[Rd] R package with Java source code

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Apr 16 13:44:52 CEST 2013


On 16/04/2013 12:20, Adrian Trapletti wrote:
> Dear All,
>
> Are there any plans around that "R CMD INSTALL
> some_package_containing_java_source code" supports Java source code
> compiling in future versions of R similar to compiling C/C++ and/or
> Fortran sources in the src directory?
>
> Best regards
> Adrian
>

No.  A Java 'compiler' is not required, but if one is available is it is 
set in etc/Makeconf as JAVAC.

There are many packages which ship jar files with 'compiled' Java code, 
and others with .class files.  It is hard to see a case for compiling at 
install time rather than when preparing the package.  But it would be 
easy to write a suitable rule in src/Makevars.

Note that most systems will not have a JDK, only a JRE.  That includes 
Windows systems, but winbuilder should be able to prepare a binary 
package (it needs a JDK to install rJava, JavaJD ...).

One needs to be slightly careful with Java version requirements.  AFAIR 
OS X Leopard systems only had 1.5 (at least for one of the 
architectures) and R 2.15.x still supported Leopard (and packages are 
still being built for it).  Systems with Java 1.6 aka 6 are still in 
widespread use, even if it past end-of-life according to Oracle.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list