Eclipse在添加MySql jdbc驱动程序时给出错误 [英] Eclipse giving error when adding MySql jdbc driver

查看:407
本文介绍了Eclipse在添加MySql jdbc驱动程序时给出错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正处于例外之下

A driver already exists with that name. Please provide a unique driver name.

有人告诉我我在做什么错吗?

Anyone tell me what i am doing wrong ?

推荐答案

请遵循: http://www.javahotchocolate.com/tutorials/jdbc.html

已经存在具有该名称的驱动程序.请提供唯一的驱动程序名称. ...直到删除工作区对该驱动程序的内部(但错误的)知识. (此过程比简单的"用户库要复杂.)

A driver already exists with that name. Please provide a unique driver name. ...until you remove the workspace's internal (but wrong) knowledge of that driver. (This process is more complicated than for a "simple" User Library.)

要删除驱动程序定义,以便您可以从头开始将其重新添加以匹配其在磁盘上的实际位置:

To remove a driver definition so that you can re-add it from scratch to match its actual location on disk:

关闭构建路径"对话框.

Close the Build Path dialog.

打开工作区首选项(菜单窗口->首选项).

Open workspace preferences (menu Window -> Preferences).

通过单击三角形扩展数据管理.

Expand Data Management by clicking its triangle.

通过单击其三角形示例连通性.

Example Connectivity by clicking its triangle.

单击驱动程序定义.

单击令人反感的定义,对于本文中的示例,该示例将为"MySQL JDBC Driver | MySQL | 5.1",然后单击删除".

Click on the offending definition, for the example in this article it would be "MySQL JDBC Driver | MySQL | 5.1" and then click Remove.

通过单击确定"关闭首选项"对话框.

Dismiss the preferences dialog by clicking OK.

在需要MySQL JDBC驱动程序的项目中返回构建路径",然后按照上面的步骤设置新的驱动程序.

Return to Build Path in the project for which you need the MySQL JDBC driver and follow the steps to set up a new driver above.

如果在到达Build Path时遇到麻烦,遇到奇怪的错误,请弹回Eclipse(然后返回相同的工作区和项目).您几乎可以肯定地发现问题已解决,您可以再次成功执行上述步骤.

If you experience trouble reaching Build Path, getting a weird error, bounce Eclipse (and return to the same workspace and project). You'll almost surely find that the problem has cleared and you can successfully follow the steps above again.

这篇关于Eclipse在添加MySql jdbc驱动程序时给出错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆