Home  >  Article  >  Database  >  java-mysql 搭建时,看到教程 没有添加 Class.forName(``);

java-mysql 搭建时,看到教程 没有添加 Class.forName(``);

WBOY
WBOYOriginal
2016-06-06 09:39:321147browse

mysqljava异常

图片说明
教程里没有添加这句Class.forName("com.mysql.jdbc.Driver");是正常的,而我copy的代码,没有这句却报异常
图片说明
图片说明
求助,是怎么个原因啊。
505050505050505050505050505050505050

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn