Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Location of MySQL Connector jar

 
Elton Hughes
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
I am learning about Java, servlets, JavaServer Pages, JDBC, and Tomcat. Whew. Lots of info, and very interesting stuff. As a part of the learning process I downloaded the latest stable version of the MySQL JDBC driver. I am using MacOS 10.2.8. I think I should place the jar in /Library/Java/Extensions . Is this correct?
The book I am using to learn from says to install the jar in the common/lib directory of Tomcat. Should this be a separate copy or a link to the jar in /Library/Java/Extensions?
Thanks,
Elton
[ October 15, 2003: Message edited by: Elton Hughes ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64683
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wouldn't put the jar in /Library/Java/Extensions at all. There's no need to.
bear
 
Elton Hughes
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear,
If not in /Library/Java/Extensions then where? And what is the role of the /Library/Java/Extensions directory?
Elton
 
Karen Gomes
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Elton,
I have never used java on a mac ... but on a PC with windows environment we treat it exactly like the jar files of j2sdk. We specify it in the classpath..
May be you can look for where the jars or classes of jdk have been specified. Guess it should be treated alike.
Karen
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64683
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If not in /Library/Java/Extensions then where? And what is the role of the /Library/Java/Extensions directory?

Tomcat ignores the system classpath. For use in Tomcat-served web applications, I'd put it in the shared/lib folder of your Tomcat installation.
bear
 
Elton Hughes
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tomcat ignores the system classpath. For use in Tomcat-served web applications, I'd put it in the shared/lib folder of your Tomcat installation.

Makes sense. The book I am using suggests placing it in Tomcat's common/lib directory.
But what if I want to use the jar for Tomcat and regular old jdbc? Two jar's or a link?
Elton
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since this is turning out to be more of a Tomcat question (the difference between the various locations in which JAR files can be placed), I'm going to move it to the Tomcat forum.
Simon
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Elton,

Find a good description of the Tomcat classloaders here:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic