ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RADEMAKERS Tanguy <>
Subject Re: <classpath> - what is it?
Date Mon, 05 Jan 2004 12:59:54 GMT

1) if your example is the one from "using ant" then it's just a snippet 
and there isn't enough context to see what ${classpath} refers to. 
Basically, some variable defined elsewhere is the correct (but not very 
helpful) answer - but ${classpath} itself has no magic value.

2) <echo>${classpath}</echo> prints "${classpath}" if ${classpath} is 
undefined, but prints the value of ${classpath} if it is defined:

<project name="mytest" basedir="." default="demo">

    <property name="definedvariable" value="foobar"/>

    <target name="demo">


Buildfile: build.xml

     [echo] foobar
     [echo] ${undefinedvariable}

Total time: 0 seconds


DevKon wrote:

>I have problem understanding <classpath> 
>>>From the manual:
>   <classpath>
>      <pathelement path="${classpath}"/>
>    </classpath>
>What is ${classpath} referring to? Also, how do I get to print variables or properties
<echo>${classpath}/<echo> prints "${classpath}", how do I get the actual value?

View raw message