ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nico Seessle" <>
Subject Re: Ant 1.2 javac classpath and classpath reference problems.
Date Sun, 22 Apr 2001 00:10:00 GMT
----- Original Message -----
From: "K Plummer" <>
To: <>
Sent: Sunday, April 22, 2001 1:35 AM
Subject: Ant 1.2 javac classpath and classpath reference problems.

> I using ANT 1.2 (WNT/W2KPRO)and Javasoft 1.3.0c and seem to be
> having problems getting the JAVAC task to take the classpath. I first
> using a
> CLASSPATH reference giving the ID. Didn't seem to work, but I wasn't
> sure I understand the syntax so....
> Next, I tried setting the classpath property and then
> using the classpath="${classpath}" construction in the javac.
> Also appeared not to work.

It would be helpful if you post the snippets from your build.xml that don't
work the way you thought they should.

For example (with Ant 1.3, don't know if it will work with Ant 1.2, but it

<?xml version='1.0' encoding='ISO-8859-1' ?>
<project name="test" default="compile" basedir=".">

  <property name="lib.dir"     value="lib"/>
  <property name="src.dir"     value="src"/>
  <property name="classes.dir" value="classes"/>

  <path id="classpath">
    <fileset dir="${lib.dir}">
      <include name="*.jar"/>

  <target name="compile">
    <javac srcdir="${src.dir}"
      <classpath refid="classpath"/>

will compile all the source in the sub-directory "src" into the
sub-directory "classes". The classpath will consist of all the jar files
that are in the sub-directory "lib".


View raw message