Question: I'm developing a Java project using Eclipse, and Ant as a build tool. When I run "ant all" from the command line, my project builds without any errors, but on Eclipse I get many compilation errors.

So I thought I'd copy Ant's Classpath onto my Eclipse Project's Build Path. 

Is there an Ant task/command to show that? Like "ant just show me your assembled classpath" or something?

Answer: 
I would introduce a task for printing the classpath, and call that task with antcall. The classpath would be given as a parameter to that task.
You can do something like this in your target, so for example

lets say you've defined your classpath as

```
<path id="project.classpath">
    <fileset dir="${SERVER_DEV}/classes">
        <include name="*.zip"/>
        <include name="*.jar"/>
    </fileset>
    <pathelement location="${SERVER_DEV}/3rdParty/jre/NT/1.5.0/lib/jsse.jar"/>
</path>

```

then you can do something like

```
<target name="compile" depends="init" description="Compiles All Java Sources">
    <property name="myclasspath" refid="project.classpath"/>
    <echo message="Classpath = ${myclasspath}"/>
    <javac ...>
         ....
    </javac>
</target>

```

It will print out the classpath used to run the specific target