ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Fuller" <>
Subject RE: <classpath> and <path> -
Date Wed, 31 Dec 2003 16:06:06 GMT

> From: DevKon []
> Sent: 31 December 2003 15:53
> Subject: <classpath> and <path> -
> Regarding <classpath> :
> ////
>    <classpath>
>       <pathelement path="${classpath}"/>
>     </classpath>
> ///
[Jim Fuller] which is understandably vague if there is no defined
<property/> named classpath.
> What is ${classpath} referring to? Also, how do I get to print
> or properties <echo>${classpath}/<echo> prints "${classpath}", how do
> get the actual value?

[Jim Fuller] 

execute the following target, in whatever build ( or example build )
file and you will receive a list of system and ant built in properties. 

<target name="debug">

..normally the system classpath is java.class.path property that is
accessible by Ant.

Now you can print out the classpath value. <echo

Though if you define classpaths that are dependent on the underlying JVM
or classpath system ENV variable you make your builds less portable e.g.
it is less likely that the build will work on another machine which may
have a differently configured system classpath...which is why we

> Regarding <path>:  what is <path> exactly - a type, a task etc.  I see
> path definitions in various example scripts but haven't seen a formal
> definition in the docs.

Paths ( or path-like ) structures to define classpaths for java
dependent Ant tasks to use. Having an explicitly defined path statement
is much cleaner way.

Basically I have always called paths and classpaths a datatype, which
admittedly is a bit awkward vocab in terms of computing regular usage of
the term.

If you want to manipulate files and directories just stick with the
fileset datatype.

Happy new year, Jim Fuller

Ps: you can change Ant's default behavior on which classpath to use or
compose them together by setting a build.sysclasspath property.
Get the skinny here:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message