University of Cincinnati logo and link  
Setting Up Connector/J
 
  UC ingot Connector/J is the Type IV driver that we use to talk to our MySQL database. 
  • Connector/J comes in a zip file.  This file contains the .class and .java files, and the .jar file.  These are redundant - you can use either, but the .jar is probably the easiest.
    • You must put the .jar file where it is accessible via the classpath.  If you put it in a directory, make sure the entire directory, including the .jar file name, is listed in the classpath.
    • Or you can take the unapproved shortcut and put it $JAVA_HOME/jre/lib/ext.
    • In our case, we'll need to put it in a Tomcat subdiretory so that Tomcat can find it.  Since our computers are somewhat locked down, we can do this either on our network driver or in C:\Temp.
      • When using Tomcat, you can either put this jar in the [TOMCAT_HOME]\common\lib directory, or [APPLICATION_HOME]\WEB-INF\lib directory.  Tomcat home will allow all of your web apps to use it, but it will load every time, whether a web app needs it or not.  Application home will let only that application use it, but you have to copy the jar file into the application home for each web application that will use it.
 Make a Quick & Dirty with Apache Tomcat