File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Configuring Linux to load mysql driviers

 
Rahul Mahindrakar
Ranch Hand
Posts: 1868
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 919
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic