前言
- 最近准备学习 Zookeeper,想从 Zookeeper 开始逐步深入了解各类中间件,学习分布式计算。
下载源码
1 git clone https://github.com/apache/zookeeper.git
安装 ANT
1 tar -zxvf apache-ant-1.10.5-bin.tar.gz
1 export PATH=/Users/wangao/Install/apache-ant-1.10.5/bin:$PATH
2 export CLASSPATH=/Users/wangao/Install/apache-ant-1.10.5/lib:$CLASSPATH
导入 Eclipse
1 cd ~/zookeeper
2 ant Eclipse
- 导入 Eclipse:File -> Import... -> Existing Projects into WorkSpace -> Select root directory -> Finish 导入 Zookeeper Project
- 设置项目的环境为 JDK 1.8:右键 -> Properties -> Java Compiler
- 完成环境搭建开始阅读代码