Java Jar File Issue

I had a tough to track down issue recently. It turns out that if you have utility.jar and utility_old.jar on the classpath, the JVM loads both in lexicographical order. This means that utility_old.jar is loaded second and any new logic with the same name in utility.jar is replaced by the old logic in utility_old.jar.

Don’t rename jar files to save them. It causes hard to find issues.

Leave a Reply

%d