Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Urgent!!!!!!!!!!!!!!!!

  1. #1
    Junior Member
    Join Date
    May 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Urgent!!!!!!!!!!!!!!!!

    hi..........
    Please give an idea about database connectivity in Java.
    Actually i want to connect with mysql in Java. But we got an exception as "ClassNotFoundException" at sentence "Class.forName("com.mysql.jdbc.Driver"). This is very critical problem for me.
    Please try to give reply as fast as possible....
    Thanks All...


  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: Urgent!!!!!!!!!!!!!!!!

    I have moved this thread to the correct forum.

    Please post your code for us to look at...
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

  3. #3
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: Urgent!!!!!!!!!!!!!!!!

    ClassNotFound usually indicates that you are missing the class from the classpath, make sure you add the mysql connector to your classpath.

    Download from MySQL :: Download Connector/J
    Read documentation at MySQL :: MySQL 5.0 Reference Manual :: 20.3 MySQL Connector/J

    Enjoy!

    // Json

  4. #4
    Junior Member
    Join Date
    May 2010
    Posts
    7
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: Urgent!!!!!!!!!!!!!!!!

    Basically Class.forName("com.mysql.jdbc.Driver") will try to find the class mentioned as a string and load it into memory.
    So you need to download mysql-connector-java-5.1.6-bin.jar and add into classpath.

  5. The Following User Says Thank You to jnthakar For This Useful Post:

    JavaPF (May 14th, 2010)

Similar Threads

  1. Urgent Help Please :)
    By Jamie94 in forum Algorithms & Recursion
    Replies: 0
    Last Post: May 12th, 2010, 06:34 AM
  2. HELP URGENT!!
    By macx234 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: March 30th, 2010, 08:41 PM
  3. Need Urgent Help
    By sonai4u in forum Threads
    Replies: 2
    Last Post: February 13th, 2010, 08:24 PM
  4. Urgent Help
    By pb60704 in forum Web Frameworks
    Replies: 7
    Last Post: December 1st, 2009, 03:27 AM
  5. Replies: 1
    Last Post: May 4th, 2009, 06:30 AM