ant-user mailing list archives

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


> what is happening is that i'm trying to compile a subset of java
> files (all stored within a directory).  these sources require
> 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 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:
For additional commands, e-mail:

View raw message