Re: How to set Classpath for MySQL
Posted by: Mark Matthews
Date: April 12, 2007 08:26AM

I recommend _not_ putting JDBC drivers in jre/lib/ext for the following reasons:

(1) It makes it harder to deploy applications that might require different versions of the same driver (which is handled by the application-specific classloaders in your appserver)

(2) It can lead to strange errors, where you _think_ you've updated the JDBC driver in your application, however an old one is sitting around in jre/lib/ext and that one gets picked up first by the VM.

Once you learn how the CLASSPATH and classloaders in J(2)EE work, you will find that even though it's not as straightforward as dropping a .jar file in jre/lib/ext, it is a lot more flexible. Unfortunately if you put "infrastructure" libraries in jre/lib/ext you lose a lot of that flexibility.

-Mark

Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html

Options: ReplyQuote


Subject
Written By
Posted
Re: How to set Classpath for MySQL
April 12, 2007 08:26AM
December 04, 2007 05:39AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.