You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Arti Singh <ar...@yahoo.ca> on 2005/08/09 17:11:15 UTC
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
Re: HELP :javac classpath
Posted by Peter Reilly <pe...@apache.org>.
please do not include .class files in the class path.
Peter
Bill Rich wrote:
>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:arti_singh83@yahoo.ca]
>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: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: HELP :javac classpath: Thankyou
Posted by Arti Singh <ar...@yahoo.ca>.
Thank you .It works
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
RE: HELP :javac classpath
Posted by Bill Rich <bi...@wilandra.com>.
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:arti_singh83@yahoo.ca]
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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org