ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <DDevie...@lgc.com>
Subject RE: classpath directory?
Date Wed, 05 Jan 2005 16:12:28 GMT
> From: Woodchuck [mailto:woodchuck_5@yahoo.com]
> 
> i keep getting "package abc.xyz does not exist" errors when trying to
> compile using <javac>.
> 
> is this a <classpath> related problem?

Yes.

> what is happening is that i'm trying to compile a subset of java
source
> files (all stored within a directory).  these sources require
importing
> of other classes that i don't have the source files for, and which are
> not in a convenient .jar file... i do however have the .class files of
> these stored in another directory.
> 
> i have tried telling <javac> to look in this directory by using
> <classpath> and the various nested tags like <pathelement>, <dirset>,
> and <fileset>.  but nothing i have tried makes any difference.
> 
> does anyone have any ideas what i may be doing wrong?

The .class files must be in a directory named after the package. So
class abc.xyz.Foo must be in a abc/xyz directory, and you must have in
your classpath the directory where abc/xyz can be found.

For example, if you have
/people/woodchuck/dependencies/classes/abc/xyz/Foo.class, you should
have /people/woodchuck/dependencies/classes in your classpath. Assuming
your build.xml is in /people/woodchuck, use
<pathelement location="dependencies/classes" /> in your <classpath>.

I hope this helps. --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message