Results 1 to 2 of 2

Thread: mysql java

  1. #1
    Join Date
    Jul 2003

    Red face Unanswered: mysql java

    i am trying to get connection with mysql by using java. when i try to compile java code it gives following compilation error

    " cannot access Connection bad class file: .\Connection.class class file contains wrong class: Please remove or make sure it appears in the correct subdirectory of the classpath.
    Connection con = DriverManager.getConnection(url, username ,pass);

    my code is :
    String username = "na_e2002";
    String password = "Eclipse";
    String url = "jdbc:mysql://" + username;
    Connection con = DriverManager.getConnection(url, username , pass);

    how i can remove this problem.
    thanks in advance

  2. #2
    Join Date
    Jan 2003
    Paris, France
    The driver class is not and is's the old jsbc driver
    you may use the new one com.mysql.jdbc
    Olivier Miossec

Posting Permissions

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