Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 31455 invoked from network); 6 Feb 2006 04:35:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Feb 2006 04:35:38 -0000 Received: (qmail 56941 invoked by uid 500); 6 Feb 2006 04:35:36 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 55921 invoked by uid 500); 6 Feb 2006 04:35:33 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 55909 invoked by uid 99); 6 Feb 2006 04:35:32 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Feb 2006 20:35:32 -0800 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [206.190.49.18] (HELO web52908.mail.yahoo.com) (206.190.49.18) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 05 Feb 2006 20:35:31 -0800 Received: (qmail 23832 invoked by uid 60001); 6 Feb 2006 04:35:10 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=tQFDHdDv9/6WzsBSE/FrwY04CIxmpAnq/NSgBe82N2bcWngUf5OR7O+76F7PanOBzKb5xyma1q1YsV8RV0iUu6G++/ybxWSFy1dXczmNvDBqsPhiqnR8GpKFsDxM2FWBjOBctAmP5M+lIamQFXi4oXCIrvzEu9F2rtv7WTUKdx0= ; Message-ID: <20060206043510.23830.qmail@web52908.mail.yahoo.com> Received: from [70.19.100.39] by web52908.mail.yahoo.com via HTTP; Sun, 05 Feb 2006 20:35:10 PST Date: Sun, 5 Feb 2006 20:35:10 -0800 (PST) From: "Ivan \"Rambius\" Ivanov" Subject: Re: classpath and simultaneous builds To: Ant Users List , Harshal Chavda In-Reply-To: <20060205190625.13653.qmail@webmail30.rediffmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello, --- Harshal Chavda wrote: > Hello ant fraternity, > I am a beginner in ant(version > -1.6.3) First, I would suggest that you upgrade to the latest version of Ant which is 1.6.5. > and have > absolutely no knowledge of java(I can only write > very simple java > programas in java).Can anyone please tell me "what > is classpath and > how is it used"? OK, classpaths specify a bunch of directories that contain .class files and/or a list of .jar files. Example, suppose you write an applicatrion that relies of log4j[1] for doing its logging. You download log4j, extract it and find log4j.jar. In order to use its classes, Java must know where it should find it. So you export a environment variable: set CLASSPATH=/path/where/you/extracted/log4j/log4j.jar Pleaee note that it is possible that your application relies on one classpath while compiling it, and a slightly different classpath for running. For example, you develop a JDBC application with oracle (and after you are done with logging jar) you have to add the oracle JDBC driver which is shipped in classes12.jar. Usually, the JDBC driver is instanitiated via reflect api like: Class.forName("oracle.jdbc.driver.OracleDriver"); In this case you may not need classes12.jar to compile the app, but you will need it while running the application, so before you run it you do set CLASSPATH=/path/where/you/extracted/log4j/log4j.jar;/path/to/classes12.jar (you still need log4j jar). Usually, without a build tool like ant you would use the second classpath as it is superset of the first one. However, with ant you have much for flexibility to reuse classpaths: Note that runtime.cp path references compile.cp. This provides a level of "classpath hygiene". For path-like structures in Ant see [2]. Regards Ivan [1]http://logging.apache.org/log4j/docs/index.html [2]http://ant.apache.org/manual/using.html#path __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org