"Caldarale, Charles R" <chuck.caldar...@unisys.com> wrote in message news:99c8b2929b39c24493377ac7a121e21f84054c1...@usea-exch8.na.uis.unisys.com... > From: Rasmus Larsen [mailto:kolibria...@gmail.com] > Subject: Loading Jar files in a particular order on Tomcat 6 > > I'm working on a web application where I have dependencies on two > different jars containing two different versions of the same class.
> Ugly, at best. > I've created a custom class loader, which first first tries to load > classes from a specific set of jars, and if that fails it just loads > the class in the standard manner. > Unless you have explicit control over the classpath used by each > classloader in the hierarchy (which you don't), a custom classloader > is pretty much the only way to handle this. I've always noticed that the classloader loads things in alphabetical order. Additionally, if it finds the same class in 2 different jars, it only seems to use the class from the first jar. I would suggest just trying to rename the "important" jars if possible with a prefix of something like aaa_<jarname>.jar to force the classloader to pick it up first. Just a thought.... Eric --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org