[R-pkg-devel] Including a jar file in a package

Duncan Murdoch murdoch.duncan at gmail.com
Wed Aug 23 18:56:16 CEST 2017


On 23/08/2017 12:07 PM, Barbara Lerner wrote:
> We are developing a package that makes a call out to a Java program.  We
> have placed a jar file for this program in inst/java and it works
> nicely.  However, when we run R CMD check, it results in a NOTE:
>
> * checking installed package size ... NOTE
>    installed size is 11.0Mb
>    sub-directories of 1Mb or more:
>      java  10.8Mb
>
> Is it likely that CRAN would accept a package that includes a large
> subdirectory like this?  If not, what is the recommended way to do
> this?  The nice thing about our current solution is that the user of our
> package does not need to separately install the Java program and deal
> with Java's classpath.
>
> Thanks for the advice.
>
> Barbara
>

It likely depends on the circumstances.  Did you write the Java code in 
the jar file?  If not, does any other CRAN package use the same jar 
file?  It doesn't really make sense for both of you to package it.

Assuming the jar file isn't already on CRAN, and it really is necessary 
for your package, and your package adds something to CRAN, they'll 
probably allow it.  You should include a comment with your submission 
explaining why you need the exception.

Duncan Murdoch



More information about the R-package-devel mailing list