File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Linux / UNIX and the fly likes Configuring Linux to load mysql driviers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Configuring Linux to load mysql driviers" Watch "Configuring Linux to load mysql driviers" New topic
Author

Configuring Linux to load mysql driviers

Rahul Mahindrakar
Ranch Hand

Joined: Jul 28, 2000
Posts: 1859
Hi
I am trying to use JDBC on Linux with mysql as the database. the driver is on the classpath and the classfiles compile fine. However on runtime i get the error no classdeffoundError org/gjit/mm/mysql/Driver
Any suggestions??
Regds.
Rahul.
Josh Lipschutz
Greenhorn

Joined: Sep 10, 2000
Posts: 2
I wish I had an answer for you but I am experiencing similar problems. I am a little new to this environment. How can I see what classpath the driver is on?
Many thanks.
George Brown
Ranch Hand

Joined: Sep 26, 2000
Posts: 919
first, it may be more appropriate to post this to the JDBC forum. There are probably loads of JDBC boffins there. But anyway, assuming you're using Linux or UNIX, type the following:
echo ${CLASSPATH} | tr ':' '\n'
That should output what paths are currently in your classpath.
If your driver is in /home/josh/classes the full path for the driver class (using Rahul's driver example) would be:
/home/josh/classes/org/gjit/mm/mysql/Driver.class
(alternatively, your Driver may be in a '.jar' file in which case, you can specify the full path of the jar file as a part of the classpath).
The path /home/josh/classes would have to be one of the paths on your classpath.
There's no tool that I know of that will tell you where your JDBC drivers are. That part is for you to decide according to the system you are putting together. Put them wherever you consider it appropriate to put JDBC drivers.
I hope that helps.
Srikanth Remani
Greenhorn

Joined: Jun 08, 2001
Posts: 4
hi,
I am also planning to install and work JDBC on Linux.
I think by placing the driver (in jar or zip form) in
/usr/java/jdk1.3.1/jre/lib/ext/

I have never used the class path stuff (not kidding, coz it never worked well 4 me).
this should work......
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Configuring Linux to load mysql driviers