2/27/2007

Don't copy jar files in auto-loaded directories

Jar files in some directories are automatically loaded into JVM in some applications. Some examples of these magic directories are, common/lib and shared/lib in Tomcat, $JAVA_HOME/jre/lib/endorsed, $JAVA_HOME/jre/lib/ext, etc. This can ease the task of classpath management, to some extent. But we should also be very careful while doing anything in these directories. Specifically, do not put any unused *.jar files in these directories, since they will also be loaded by java runtime and may cause conflict.

Sometimes I need to try a different version of a jar. I rename the old jar to foo-02272007.jar and copy the new jar over. In an auto-loaded directory, this may cause nasty random errors due to conflict between 2 versions of the same jar. I should really back up the old jar as foo.jar.20202007 without a .jar extension to exclude it from auto-loading.

6 comments:

Shivani said...

wonderful blog :)

eMexo Technologies said...

Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.

Internet Of Things training in electronic city

eMexo Technologies said...

Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.

Internet Of Things training in electronic city

Reshma said...
This comment has been removed by the author.
silakarim said...


Excellent Post. I really admire after reading this blog.
ccna Training in Velachery
ccna Training in Tambaram
ccna Training in T Nagar
ccna Training in OMR
ccna Training in Porur
ccna Training in Vadapalani
ccna Training in Adyar
ccna Training in Thiruvanmiyur
ccna Training in Anna nagar

subhashini said...


Nice Blog!! Thanks For Sharing! Keep update more information..
Tally Course in Chennai
Tally Classes in Chennai
Tally training coimbatore
Tally course in madurai
Tally Training in Chennai
Tally Institute in Chennai
Tally Training Institute in Chennai
ielts coaching centre in coimbatore