hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Wannheden <>
Subject Re: Eclipse + Ant + JUnit + Hivemind
Date Wed, 20 Oct 2004 09:03:39 GMT

To me it sounds like, as you suspect yourself, the project's ${build}
directory is missing from the classpath when you're running the
<junit> task.  I assume the NoClassDefFoundErrors you get refer to
classes part of your project -- i.e. in the ${build} directory.

And you say that this ${build} directory is missing in the system
property java.class.path when you run the test target from within
Eclipse.  I wouldn't say it is missing.  I just assume you've defined
the CLASSPATH environment variable to include ${build} when you're
running your test target in command line.  This is maybe rather

What I think you have to do is to explicitly define the classpath for
the <junit> task to include the ${build} directory.  Take a look at
the Ant manual on how to do this.

Hope this helps,


On Wed, 20 Oct 2004 13:17:57 +0800, Alistair Israel <> wrote:
> Hello, list.
> I asked about my 'dilemna' on the JUnit list, but since I figured it's
> related to Hivemind I'm cross-posting it here. It's not quite so much
> of a problem, but being OC as we are it's a royal annoyance, and I was
> hoping the list could help.
> Background: I'm using Eclipse 3.0.0, Ant 1.6.2 and JUnit 3.8.1
> (Windoze 2K). The code I'm writing and testing uses Hivemind 1.0 to
> dynamically create my objects and wire them together.
> My Eclipse project is set up just fine. The Ant scripts do their
> thing. Running the "compile-all" target from either within Eclipse or
> via Ant on the command-line is A-OK.
> A have JUnit tests that run fine when run within Eclipse whether
> individually or as a suite.
> I then created a <junit> task within the project's Ant build scripts
> to run the suite. When I ran the Ant "test-XXX" targets _from the
> command line_, everything worked as expected.
> Here's the rub: When I run the same Ant targets from _within Eclipse_,
> I get a bunch of java.lang.NoClassDefFoundError exceptions with the
> Hivemind stuff getService(...) calls..
> What I've noticed is that when I run the test targets in Eclipse, the
> System property "java.class.path" is missing a couple of directories,
> most notably, my project's ${build} directory.
> I'm still trying to figure out what's causing this (remember, the
> build itself works either way, and only the tests are failing in
> Eclipse) but was wondering if anyone's done this before or has had any
> similar experiences and might be able to point me to a few leads?
> Thanks in advance!
> Alistair A. Israel
> --
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message