Jdbc Driver Not Found(找不到 Jdbc 驱动程序)
问题描述
我们正在使用 Java 在 netbeans 中开发一个项目,该项目使用 mysql 数据库来处理一些常见查询.但是我在 netbeans 中为 mysql 加载 jdbc 驱动程序时遇到问题.它给出了以下错误:
We are working on a project in netbeans using Java which uses mysql database to process some common queries. But I am having issues with loading jdbc drivers for mysql in netbeans. It is giving following error:
未找到类异常:com.jdbc.mysql.Driver请帮帮我.
Class Not Found Exception : com.jdbc.mysql.Driver please help me out.
推荐答案
您只需将 MySQL JDBC 连接器添加到您的项目中.例如,对于 Oracle 数据库,这将是类似的(您必须添加 ojdbc6.jar).
You just have to add the MySQL JDBC connector to your project. It would be similar for an Oracle database, for example (you would have to add the ojdbc6.jar).
对于 MySQL,您必须获取 MySQL JDBC 连接器并将其添加到项目的类路径中.
For MySQL, you have to get the MySQL JDBC connector and add it to your project's classpath.
- 在 MySQL 站点上获取 MySQL JDBC 连接器,或者通过 Maven 依赖项添加它(如果您的项目由 Maven 驱动),请检查 MySQL 官方网站.截至 2012 年 5 月的当前版本为 5.1.19(适用于任何版本的 MySQL);
- 将其添加到项目属性中的 Netbeans 类路径中.如果需要,请检查有关项目类路径的在线 Netbeans 配置
- Get the MySQL JDBC connector, either on the MySQL site, either adding it through a Maven dependency (if your project is driven by Maven), check the official MySQL site. The current version as of May 2012 is 5.1.19 (works with any version of MySQL);
- Add it to your Netbeans classpath, in the project properties. Check the online Netbeans configuration about project classpath if needed
这篇关于找不到 Jdbc 驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:找不到 Jdbc 驱动程序


基础教程推荐
- 带有WHERE子句的LAG()函数 2022-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
- 带更新的 sqlite CTE 2022-01-01
- 从字符串 TSQL 中获取数字 2021-01-01
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- MySQL 5.7参照时间戳生成日期列 2022-01-01
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01