runtime error: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

前端 未结 6 1171
刺人心
刺人心 2020-11-28 16:13

I am new to mysql and jdbc and I am getting the error in this title. I have been searching all day and cannot find a solution that works for me.

What I have tried:

6条回答
  •  醉梦人生
    2020-11-28 16:30

    I was also get same problem :-
    How I solved for Linux system.

    1.) Download file mysql-connector-java-5.1.18-bin.jar from given link or other.

    2.) Then paste it to same folder or directory of your class or file (on where you want connection to present)

    3.) Now use the following command by your linux command prompt.

    java -cp .:mysql-connector-java-5.1.18-bin.jar YourFileName ..

    Thats all you need to do... :)

提交回复
热议问题