Subject: Re: Java packages: source vs. binary (was Re: Ant package)
To: Heather D. Pfeiffer <>
From: Todd Vierling <>
List: tech-pkg
Date: 09/16/2003 17:33:17
On Tue, 16 Sep 2003, Heather D. Pfeiffer wrote:

: The person we (Mahesh and I) are working for wants everything from
: sources.  Why does distributed binaries not have the same .jar files
: as what is produced from compiling the Java code?  Is it because
: Apache Ant only gives the source code for the basic routines?

The fact that a source file references a third-party package does not mean
that the binary JAR cares one whiff about that package unless you ask for
it.  8-)

Java sources can refer to external class packages.  For instance, Ant has
built-in hooks for BSF, JUnit, JDepend, and oodles of other third-party
packages that are not bundled with Ant.  These third-party packages are not
required for Ant to work at runtime -- but if they are present in your
CLASSPATH, the Ant hooks for them work just fine, without recompiling Ant

In order to get a .jar with the same code as is shipped in the Ant binary
distribution, you must have *all* of those dependencies available at
source-build time.  This is why Java apps are typically used in binary, not
source, distribution form.  For the general pkgsrc-using public, prebuilt
JARs should indeed be the way to go, as this is how the majority of Java
packages are used in the real world.

If you want it all from sources, well, "you have a whole lot more
downloading to do."  Please don't ask that to be forced on everyone else.

-- Todd Vierling <> <>