java project如何连接数据库
1,首先从mysql的官网上下载mysql-connector-java-5.1.44.zip

2,选择downloads下的community

3,在Community下选择MySql Connectors

4,下面是MySQL Connectors的版本,我们选择Connector/J

5,选择zip的文件包,进行下载。



6,将下载好的文件包进行解压,找到其中mysql-connector-java-5.1.44-bin

7,创建一个项目,项目进行右击,选择Add External Archives

8,配置成功后的结果,如下图所示

9,输入如下所示程序代码,以进行测试,实验表明:连接成功。


java project如何连接数据库的更多相关文章
- 我的第7个java程序--把java web项目改为java project项目--mybatis
连接数据库需要 程序,连接字符串,查询语句 主程序->读取连接字符串->读取查询语句->把查询到的值赋值给映射对象->打印对象属性 java project的好处,不用做那么多 ...
- java compiler level does not match the version of the installed java project facet 解决方案
项目出现 java compiler level does not match the version of the installed java project facet 错误,一般是项目移植出现 ...
- java compiler level does not match the version of the installed java project facet
Java compiler level does not match the version of the installed java project facet错误的解决 因工作的关系,Eclip ...
- export a java project to runable jar
When a java project needs to be transfered to another machine, e.g. vps, we need to export it to a r ...
- Using Maven to generate a Java Project or Web project
I often to generate a Java project or Web project with Eclipse tool. Well, I have no idea when I wan ...
- Java compiler level does not match the version of the installed Java project facet.(转)
Java compiler level does not match解决方法 从别的地方导入一个项目的时候,经常会遇到eclipse/Myeclipse报Description Resource P ...
- maven项目 Java compiler level does not match the version of the installed Java project facet
因工作的关系,Eclipse开发的Java项目拷来拷去,有时候会报一个很奇怪的错误.明明源码一模一样,为什么项目复制到另一台机器上,就会报“java compiler level does not m ...
- Java compiler level does not match the version of the installed Java project facet.问题
从同事那里拷贝过来的web项目,导入到eclipse中,出现Java compiler level does not match the version of the installed Java p ...
- Java compiler level does not match the version of the installed Java project facet. springmvc1 和 Target runtime Apache Tomcat v7.0 is not defined.
Java compiler level does not match the version of the installed Java project facet.springmvc1 : Targ ...
随机推荐
- Struts2 (四) — 拦截器
一.拦截器 1.概述 1.1什么是拦截器 在struts2中,拦截器(Interceptor)是用来动态拦截Action执行的对象. 拦截器有点类似以前Servlet阶段的Filter(过滤器 ...
- jquery replace方法去空格
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- js-script标签放在的位置
* 建议把script标签放到</body>后面 * 如果现在有这样一个需求 在js里面需要获取到input里面的值,如果把script标签放到head里面,会出现问题.HTML解析是从上 ...
- Django之Form字段插件
一.Django内置Form组件: 在使用Django内置的Form组件时,里面包含了许多[字段]和[插件],也就是验证用户输入的请求以及生成显示在前端的HTML.下面介绍一下用法: F ...
- drupal中安装CKEditor文本编辑器,并配置图片上传功能 之 方法二
drupal中安装CKEditor文本编辑器,并配置图片上传功能 之 方法一 中介绍了ckeditor的安装和配置方法,其实还有另一种新方法,不用IMCE模块. 不过需要ckfinder的JS库,可以 ...
- jQuery瀑布流+无限加载图片
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- 使用input做简单的上传图片
css 代码: .container{ width: 200px; height: 200px; border: 1px solid #666; } HTML 代码: <input type=& ...
- baidu地图api , 地理位置转 经纬度接口
更多可以查看 http://lbsyun.baidu.com/index.php?title=webapi/guide/webservice-geocoding 地理编码示例: 以下是关于地理编 ...
- Fragment初探
Fragment允许将Activity拆分成多个完全独立封装的可重用的组件,每个组件有它自己的生命周期和UI布局.Fragment最大的优点是为不同屏幕大小创建灵活的UI.每个Fragment都是独立 ...
- C#多线程顺序依赖执行控制
在开发过程中,经常需要多个任务并行的执行的场景,同时任务之间又需要先后依赖的关系.针对这样的处理逻辑,通常会采用多线程的程序模型来实现. 比如A.B.C三个线程,A和B需要同时启动,并行处理,且B需要 ...