Original address: http://www.it165.net/os/html/201411/10142.html
Zookeeper GitHub is: https://github.com/apache/zookeeper
Unzip, open cmd, switch to the root directory of the zookeeper source (there is a build.xml file below), then enter the command > Ant eclipse
The following interface prompts the compilation to succeed:
Then open Eclispe, whatever version, choose Import, type is the existing Eclispe project.
Click Done, but found that my source has several errors, but the type is the same, are cannot switch on a value of type XXX:
On the web, it's about the JDK version that the project file uses to compile, and you need to switch JDK 7 to JDK 6:
In the imported Zookeeper project, right click-"properties-" Java Compiler, the Compiler compliance level switch to 1.6:
This error will disappear, the following can start to enter the real zookeeper source of the tour!
Zookeeper source is compiled with Ant for Eclipse Engineering-reproduced