Results 1 to 2 of 2

Thread: mySql & java

  1. #1
    Join Date
    Jul 2003
    Posts
    2

    Unanswered: mySql & java

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

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

    my code is :
    Class.forName("org.gjt.mm.mysql.Driver1");
    String username = "username";
    String password = "password";
    String url = "jdbc:mysql://mysql.it-c.dk" + username;
    Connection con = DriverManager.getConnection(url, username , pass);

    how i can remove this problem.
    thanks in advance

  2. #2
    Join Date
    Aug 2003
    Posts
    2

Posting Permissions

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