Class.forName(“com.mysql.jdbc.Driver”).newInstance()

前端 未结 4 867
盖世英雄少女心
盖世英雄少女心 2020-12-18 14:14

I am having this error on Netbeans 7.2, it says that ClassNotFoundexception and InstantationException. I am really stuck on this matter. Kindly help me.

prot         


        
4条回答
  •  半阙折子戏
    2020-12-18 15:17

    You need to add mysqlconnector.jar file found here: ( http://dev.mysql.com/downloads/connector/j/ ) into your lib folder of your project. Include it with your project and then you can access your connection with database.

    Add that jar into the buildpath.

提交回复
热议问题