From wdunlap at tibco.com  Wed Feb  8 23:12:17 2012
From: wdunlap at tibco.com (William Dunlap)
Date: Wed, 8 Feb 2012 22:12:17 +0000
Subject: [Rd] Canonical package directory name for JAR files?
In-Reply-To: <9166865A-D720-4971-A7BA-D5952219C88A@r-project.org>
References: <C9774AFE-A21F-43EC-B33C-BB6F71F23E14@r-project.org>
	<CB57FB66.28481%proebuck@mdanderson.org>
	<E66794E69CFDE04D9A70842786030B93265A56@PA-MBX03.na.tibco.com>
	<9166865A-D720-4971-A7BA-D5952219C88A@r-project.org>
Message-ID: <E66794E69CFDE04D9A70842786030B93265BA4@PA-MBX03.na.tibco.com>

We don't "mandate" a given JDK (including the compiler,
javac), but we do supply the JRE.  We do require that the
java compiler be able to produce code that the JRE accepts
(we test-run javac with a variety of common version-type
flags to try to find one that works with our JRE).

It is source:pkg/java/{src,prebuiltjars,Makevars} -> binary:pkg/jars,
roughly parallel with source:pkg/src -> binary:pkg/libs.

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com 

> -----Original Message-----
> From: Simon Urbanek [mailto:simon.urbanek at r-project.org]
> Sent: Wednesday, February 08, 2012 1:46 PM
> To: William Dunlap
> Cc: Roebuck,Paul L; R-Devel
> Subject: Re: [Rd] Canonical package directory name for JAR files?
> 
> Unfortunately we cannot mandate JDK so packages have to use the build stage for compilation so the S+
> model doesn't work. I think java is more consistent than src/java -> jars
> 
> Sent from my iPhone
> 
> On Feb 8, 2012, at 3:27 PM, William Dunlap <wdunlap at tibco.com> wrote:
> 
> > For what it is worth, the S+ package system uses
> > the java directory in source packages to store
> > java source code (under pkg/java/src/, using the usual
> > directory structure that follows the class structure
> > under there), prebuilt jar files (in pkg/java/prebuiltjars,
> > no subdirectories), and a Makevars file (pkg/java/Makevars)
> > that can define the java compiler flags PKG_JAVAC_CLASSPATH
> > and PKG_JAVACFLAGS, e.g.,
> >  PKG_JAVAC_CLASSPATH=$(SHOME)/java/jre/libext/jaxp.jar;$(SHOME)/java/jre/libext/batik.jar
> >  PKG_JAVACFLAGS=-verbose -g
> >
> > INSTALL compiles the java code in pkg/java/src and puts
> > it into into a jar file called pkg/jars/pkg.jar.  All of
> > the jar files in pkg/java/prebuiltjars are copied into
> > pkg/jars as well.  The installed package has a jars directory
> > but no java directory (i.e., {java,jars} <=> {src,libs}).
> >
> > library(pkg) adds pkg/jars to the CLASSPATH so .Java calls
> > will find it.
> >
> >
> > Bill Dunlap
> > Spotfire, TIBCO Software
> > wdunlap tibco.com
> >
> >> -----Original Message-----
> >> From: r-devel-bounces at r-project.org [mailto:r-devel-bounces at r-project.org] On Behalf Of
> Roebuck,Paul L
> >> Sent: Wednesday, February 08, 2012 8:14 AM
> >> To: Simon Urbanek
> >> Cc: R-Devel
> >> Subject: Re: [Rd] Canonical package directory name for JAR files?
> >>
> >> On 2/7/12 5:37 PM, "Simon Urbanek" <simon.urbanek at r-project.org> wrote:
> >>
> >>> On Feb 7, 2012, at 4:34 PM, Roebuck,Paul L wrote:
> >>>
> >>>> We have an R package which needs to include a JAR file.
> >>>> Is there a canonical directory for it?
> >>>
> >>> rJava defines "java" for that purpose (see ?.jpackage).
> >>> How canonical that is may be open for debate ;)
> >>
> >> Yeah, when I wrote Java stuff, that was the Java source code
> >> root directory. Yet, 'lib' (which was the directory where JAR
> >> files lived in Java projects) seems inappropriate for non-Java
> >> projects.
> >>
> >> But 'java' appears to be the de-facto standard for R packages,
> >> so...
> >>
> >> ______________________________________________
> >> R-devel at r-project.org mailing list
> >> https://stat.ethz.ch/mailman/listinfo/r-devel
> >
> >



[Rd] Canonical package directory name for JAR files?
William Dunlap