MySQL和Eclipse设置 [英] Mysql and eclipse setup
本文介绍了MySQL和Eclipse设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Eclipse的连接配置文件中看不到 mysql ,我试图创建一个新的连接,但徒劳无功.
I am unable to see mysql in connection profile in eclipse, I have tried of creating a new connection but all in vain.
我该如何解决类未找到的错误.
Also how can I solve class not found error.
推荐答案
- 在计算机上安装Eclipse
- 从 http://www.mysql.com/products/conector <下载JDBC(Java数据库连接).选择独立于平台"
- 将其解压缩/解压缩.打开新文件夹创建通过拆箱.确保您在文件夹中看到一个jar文件,其中有一个名称类似于mysql-connector-java-5.1.34-bin.jar
- 在Eclipse中创建一个新的Java项目.将其称为MySQLTest1(或您想要的任何名称).
- 拖动&删除JDBC连接器jar文件(mysql-connector-java-5.1.34-bin.jar)到您在Eclipse中的项目.选择复制文件而不是链接文件".
-
在项目(下面给出了源代码)
- Install Eclipse on your computer
- Download JDBC (Java DataBase Connectivity) from http://www.mysql.com/products/conector. Select "Platform Independent"
- Unzip/unpack it. Open the new folder create by the unpacking. Make sure you see a jar file in the folder, with a name similar to mysql-connector-java-5.1.34-bin.jar
- Create a new java project in Eclipse. Call it MySQLTest1 (or whatever name you want).
- Drag & drop the JDBC connector jar file (mysql-connector-java-5.1.34-bin.jar) to your project in Eclipse. Select copy file and not "link file".
Create 2 java classes in the project (source code given below)
Main.java, and
MySQLAccess.java
在项目中单击mysql-connector-java-5.1.34-bin.jar以突出显示
Click on mysql-connector-java-5.1.34-bin.jar in the project to highlight it
这篇关于MySQL和Eclipse设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文