[Xapian-discuss] Xapian 0.8.2 released

Eric B. Ridge ebr at tcdi.com
Fri Sep 17 00:43:39 BST 2004


On Sep 16, 2004, at 7:33 PM, Olly Betts wrote:

> On Thu, Sep 16, 2004 at 07:18:56PM -0400, Eric B. Ridge wrote:
>> hmm.  You need a classpath setting for the javac command that points 
>> to
>> the "src" directory.  Something like:
>>
>> javac -d . -classpath $XAPIAN_BINDINGS/java/ AssertionError.java
>>
>> I'm not sure how to translate that into make-speak, but hopefully 
>> it'll
>> provide a hint.
>
> Probably.  One clarification the argument to -classpath presumably 
> needs
> be the path to the .class files?  Do the .java files need to be on the
> class path too?  I'm not quite seeing how javac uses the classpath here

yes.

I'm just assuming that the makefile is iterating over all the 
directories, running javac in each.  To quickly compile a small set of 
.java files, I usually do this from within the root of the source 
directory.

	javac -classpath . -d . `find ./ -name "*.java"`

This will generate the .class files alongside the .java files.  Not 
sure how well this will play with make.

> The issue is that if we're building with srcdir != builddir then the 
> .java files are in srcdir while the .class files will be in builddir.

If this is what you want, then just include the srcdir and builddir in 
the -classpath argument, like so:
	-classpath $srcdir:$builddir

eric




More information about the Xapian-discuss mailing list