Results 1 to 2 of 2

Thread: mySql & java

  1. #1
    Join Date
    Jul 2003

    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 = "username";
    String password = "password";
    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
    Aug 2003

Posting Permissions

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