Ubuntu下从源码编译生成MySql Connector过程

来源:互联网 发布:淘宝现金券的使用说明 编辑:程序博客网 时间:2024/06/05 14:20
参考自
http://dev.mysql.com/doc/connector-j/en/connector-j-installing-source.html

1.安装Bazaar 
apt-get install bzr
2.安装Apache Ant
apt-get install ant
3.安装jdk6
aptitude -y install openjdk-6-jdk
4.安装jdk5(jdk5无法直接通过上述方式安装)
登陆进入页面http://www.oracle.com/technetwork/java/javase/downloads/index.html
下载jdk-1_5_0_22-linux-i586.bin并上传至目录/home/tool/jdk
cd /home/tool/jdk
chmod 777 jdk-1_5_0_22-linux-i586.bin
sudo -s ./jdk-1_5_0_22-linux-i586.bin 
 选择yes
安装后设置环境变量

设置完后reboot
当查看到如下信息时候就表示设置成功



5.下载库文件
ant-contrib.jar
http://sourceforge.net/projects/ant-contrib/files/ant-contrib/1.0b3/
junit.jar
https://github.com/junit-team/junit/wiki/Download-and-Install
hibernate相关
http://sourceforge.net/projects/hibernate/files/hibernate4/
6.具体过程
下载最新源代码
shell> bzr branch lp:connectorj
将已经准备好的库文件放置在extralibs目录


创建文件build.properties


使用ant编译
shell> ant dist
成功的话将看到如下信息:



0 0