Mac OS X: MySQL JDBC configuration


I've been running Apache, PHP & MySQL successfully on my Mac, but would now like to try my hand at some JSP's. I have installed, and am currently running Jarkata Tomcat 4.1.24, but need to connect my database with a JDBC driver.

In this tutorial it says to download the Connector/J driver (done and installed) but now I'm stuck trying to figure out how to add the JAR file, such as mysql-connector-java-2.0.14-bin.jar, to my classpath. I've searched around for a few days and can't find anything on the web about this, so basically, in Mac OS X, how do I add this to my classpath? Where is my classpath, and how do I get to it?




I'm not sure how you set an environment variable in a Mac, but the way to set your classpath is to set the CLASSPATH enviroment variable, if that gives you any idea of how to go about it.

You can also put the Connector/J JAR into the tomcat lib directory ($TOMCAT_HOME/common/lib I think, or maybe just $TOMCAT_HOME/lib)


put the file in /Library/Java/Extensions/

That is equivelant to adding to the classpath like how redemption said.


Thanks for your help. Putting it in my ...extensions/ directory worked.


closed #5