This week's giveaways are in the MongoDB and Jobs Discussion forums.
We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line!
See this thread and this one for details.
The moose likes JDBC and the fly likes Where to put jdbc jar files Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Where to put jdbc jar files" Watch "Where to put jdbc jar files" New topic
Author

Where to put jdbc jar files

Steve Campbell
Ranch Hand

Joined: Dec 18, 2000
Posts: 41
I'm writing my first java application which doesn't use odbc. (Up till now I've been writing servlets which run under Tomcat). I'm using the mm mysql driver. I've tried putting the jar file under the jdk1.3\lib & jdk1.3\lib\ext. Do I need to use the "classpath" variable (I'm using windows 2000)? I already have a "java_home" variable which I created for Tomcat, does this do anything for applications?
Steve
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

If the problem is with using Tomcat, have a look at this thread.
Dave.
Steve Campbell
Ranch Hand

Joined: Dec 18, 2000
Posts: 41
I already have it working under Tomcat (I put the jdbc driver jar file in "jakarta\lib"). My problem is that I'm trying to write an "application". I've since found that I can make it work by using the "-classpath" option when using the "java" command to run the program. I had read that if you place the jar files into "jdk\jre\lib\ext", and create a "java_home" environment variable pointing to the jdk, then the "java" command will pick up the jar files.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Where to put jdbc jar files
 
Similar Threads
How to set up JSDK2.1 server
startup.bat
adding jar file to web server
Tomcat 4.1.12 & CLASSPATH
url for datasource (urgent)