Results 1 to 2 of 2

Thread: Help with MySQL Connector/J

  1. #1

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256

    Help with MySQL Connector/J

    Has anyone ever used the MySQL Connector/J to interact with a MySQL database?

    I'm having trouble getting it to work at all. I've downloaded it, and attempted to put it in multiple locations. I've set my path variable, I've put it in the directory with the source, I've even tried using CLASSPATH to point to it...but no matter what I do, I get this error:

    java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    It manages to compile without any errors or warnings...just won't run.

    Has anyone accomplished this before that can walk me through it or provided some suggestions?

    I've been over the readme file and various internet sites trying to get it to work with no avail.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: Help with MySQL Connector/J

    Quote Originally Posted by The Hobo
    I've even tried using CLASSPATH to point to it...
    "Even"? That's the only valid solution, you know.

    I've used Connector/J many times and usually without serious problems.

    Show us exactly what your Java command line is, where the Connector/J jar resides, what the value of your CLASSPATH variable is.

    The reason it compiles is that there is no direct reference to any Connector/J class in the code, just the indirect reference in
    Class.forName("com.mysql.jdbc.Driver");
    where the compiler doesn't recognize the class name as something that needs to be looked up.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width