首先看看官网怎么说,ide使用的是eclipse(https://cwiki.apache.org/confluence/display/ZOOKEEPER/UsingEclipse)

1. 安装Ant
Ant下载地址:http://ant.apache.org/bindownload.cgi 解压,设置环境变量:ANT_HOME,并追加到Path变量中.

2. 下载zookeeper源码
下载地址:https://github.com/apache/zookeeper
可选择自己想要的分支,我下载master,git clone https://github.com/apache/zookeeper.git

执行 ant eclipse。编译成eclipse能import的项目

eclipse import 项目& 效果:


注意:jdk选择1.7以上,否则有编译错。
网友评论