为了深入学习Zookeeper,准备把zookeeper源码导入eclipse中学习

 

一、Ant环境准备

  因为我自己用的是Mac,直接输入命令:brew install ant即可 Zookeeper 源码解析-环境准备

 

  如果是window环境,只需要下载对应版本的ant,配置环境变量即可

 

二、Git上 clone zookeeper源码

  git clone https://github.com/apache/zookeeper

 

三、ant eclipse 编译eclipse工程

  进入源码目录,输入ant eclipse

  我这边每次都会出现:javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException

  Zookeeper 源码解析-环境准备

 

解决方案:

  1、在浏览器中打开http://ufpr.dl.sourceforge.net/project/ant-eclipse/ant-eclipse/1.0/ant-eclipse-1.0.bin.tar.bz2,并下载对应的文件

  2、将文件copy 到 zookeeper源目录zookeeper-server/src/main/resources中

  3、打开build.xml文件,找到需要下载的地方注释掉即可

    Zookeeper 源码解析-环境准备

 

再次输入命令ant eclipse,看到如下图所示,表示编译成功:

  Zookeeper 源码解析-环境准备

 

最后将zookeeper以eclipse工程导入idea或eclipse中即可

  Zookeeper 源码解析-环境准备

 

相关文章:

  • 2021-07-10
  • 2021-06-09
  • 2022-12-23
  • 2021-08-14
  • 2021-05-28
  • 2021-07-06
  • 2021-12-27
猜你喜欢
  • 2021-05-22
  • 2021-12-20
  • 2021-11-10
  • 2022-12-23
  • 2021-12-03
  • 2022-12-23
  • 2021-07-09
相关资源
相似解决方案