標籤:classnotfoundexceptioncom.mysql.jdbc.driver
調試3M網站項目時出現錯誤提示:ClassNotFoundExceptioncom.mysql.jdbc.Driver
650) this.width=650;" width="1200" height="867" title="1234.jpg" style="width:546px;height:406px;" src="http://s5.51cto.com/wyfs02/M00/7C/DD/wKioL1bZghbjI9Y5AAcV33s2gmc432.jpg" alt="wKioL1bZghbjI9Y5AAcV33s2gmc432.jpg" />
原因分析:項目中缺少mysql-connector-java-5.1.22-bin.jar包
解決辦法:
①右鍵工程名->New->Folder,建立檔案夾lib,右鍵lib檔案夾->Import匯入mysql-connector-java-5.1.22-bin.jar
②選中jar包右擊--->BuildPath--->Add To Build Path,如所示:
650) this.width=650;" title="2345.jpg" src="http://s4.51cto.com/wyfs02/M02/7C/DD/wKioL1bZgljhzouZAAFm9FBAZ1M295.jpg" alt="wKioL1bZgljhzouZAAFm9FBAZ1M295.jpg" />
測試結果:在瀏覽器中輸入地址:http://localhost:8080/3M/,顯示正常
650) this.width=650;" width="827" height="278" title="3456.jpg" style="width:596px;height:245px;" src="http://s3.51cto.com/wyfs02/M02/7C/DE/wKiom1bZgeyg4PM_AADJ1tXFXms544.jpg" alt="wKiom1bZgeyg4PM_AADJ1tXFXms544.jpg" />
本文出自 “DOSOM” 部落格,謝絕轉載!
ClassNotFoundExceptioncom.mysql.jdbc.Driver