java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver doesn't work anymore in java. How to fix this?

前端 未结 2 1840
执念已碎
执念已碎 2021-01-24 01:31

It worked two days ago. Now it doesn\'t. I\'m 100% sure the coding is correct. This is the way I used to connect the database. Couldn\'t find an answer yet to my problem. Please

2条回答
  •  一生所求
    2021-01-24 01:59

    Please add your jar to the class path like below.

    java -cp .;C:\Program Files\MySQL\mysql-connector-java-5.1.15\mysql-connector-java-5.1.15.jar MysqlConnect

    Note:Please replace msql connector with your jar file as per requirement.

提交回复
热议问题