Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Junit class loading problems under Project Builder



Folks:

I'm attempting to use Project Builder to construct a Junit test suite, and am running into problems with the classpath that Junit apparently is seeing. Junit performs dynamic loading of classes when it runs a test suite. It is able to find the classes that comprise the code that I created, but it is unable to find any of the code that resides in other, external jar file.

For instance, one of my test cases relies on HttpUnit, whose code lives in httpunit.jar, which I have placed in /Library/Java/Extensions, along with its other dependent jars. Project Builder sees all HttpUnit classes at compile time, but at runtime, Junit reports a java.lang.NoClassDefFoundError.

My guess is that Project Builder is somehow giving the runtime JVM a different classpath than it uses at compile time... but I have no idea how to fix this. I have tried setting the CLASSPATH environment variable under the Executable settings (in the Project Builder build targets window), but that doesn't seem to have any effect.

Please cc: any replies to email@hidden (I receive only a digested version of the actual mailing list, so I wouldn't otherwise receive your reply for a day).

Thanks for any help you can offer...

Erik Norvelle

_________________________________________________________________
Enter for your chance to IM with Bon Jovi, Seal, Bow Wow, or Mary J Blige using MSN Messenger http://entertainment.msn.com/imastar
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.