You need something like the following to define the classpath:

<!-- A class path for the Java compiler. -->
<path id="classpath.compile">
  <fileset dir="./${build.pkg}">
    <include name="**/*.class"/>
  </fileset>
  <fileset dir="./${src.lib}">
    <include name="**/*.jar"/>
    <include name="**/*.zip"/>
  </fileset>
  <pathelement location="."/>
</path> 

Then when you use it use something like this in the <javac> task:
<classpath refid="classpath.compile"/>

Setting the value of the file name in a property won't do it for you.
HTH Bill

-----Original Message-----
From: Arti Singh [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 09, 2005 8:11 AM
To: user@ant.apache.org
Subject: HELP :javac classpath


 Hi ,

        I just want to clarify a few things.I am trying to compile a few
java files in my ant build script using a classpath variable to point to
required libraries.I tried the approach below.I tried to define my classpath
in properties and then used them in javac, but that doesnt seep to help.Can
someone please point me in the right direction.?
Thankyou,

Arti

<property name="autoplugin.classpath" value="C:/Program
Files/OMS/SDK/AutoPlugin/SDK/AutoPlugin_bin"/>

<property name="sdk.dir" value="C:/Program Files/OMS/SDK"/>

<property name="auto_plugin.classpath" value=
"${autoplugin.classpath}/xmlparserv2.jar;${autoplugin.classpath}

/automation_plugins.jar;${sdk.dir}/deploytool.jar;${sdk.dir}/automationBuild
.jar;${weblogic.dir}/server/lib/weblogic.jar;"/>

 

<javac srcdir="${taskcontext.emul.srcdir}"
destdir="${taskcontext.emul.classes.destdir}" 
classpath="${auto_plugin.classpath}">
  <include name="com/mslv/oms/sample/taskcontext/*.java"/>
</javac>



                
---------------------------------
Find your next car at Yahoo! Canada Autos



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to