ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject Re: Confusion of jar in Ant's classpath and system's CLASSPATH
Date Tue, 29 Nov 2005 15:41:35 GMT
> I met a very strange problem that one jar doesn't become useful after I
> put it to Ant classpath setting, ClassNotFoundException will be thrown
> out. After I put the jar to system's CLASSPATH, Ant target runs without
> problem. [...]
> Here is the sample classpath declaration in my build script. Class
> extends, it is included
> in 1-1.jar. The ClassNotFound class is located in 2-1.jar which will be
> invoked by the class in 3-1.jar.

How so invoked? Is that class that's not found used directory by the
code, or indirectly thru a Class.forName() call? If the later, you may
need to use the Context ClassLoader to correctly locate the class (see
overloaded form of forName()).

Could be something else too, but it's not easy to diagnose with the
information you provided. Class loading issues are tricky. --DD

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

View raw message