Is there a tool to discover if the same class exists in multiple jars in the classpath?
Posted
by
David Citron
on Stack Overflow
See other posts from Stack Overflow
or by David Citron
Published on 2008-09-25T20:47:56Z
Indexed on
2010/12/24
0:54 UTC
Read the original article
Hit count: 114
If you have two jars in your classpath that contain different versions of the same class, the classpath order becomes critical.
I am looking for a tool that can detect and flag such potential conflicts in a given classpath or set of folders.
Certainly a script that starts:
classes=`mktemp`
for i in `find . -name "*.jar"`
do
echo "File: $i" > $classes
jar tf $i > $classes
...
done
with some clever sort/uniq/diff/grep/awk later on has potential, but I was wondering if anyone knows of any existing solutions.
© Stack Overflow or respective owner