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