I was reading the
ZooKeeper Cluster Set-Up Document
$ java -cp zookeeper.jar:lib/log4j-1.2.15.jar:conf \ org.apache.zookeeper.server.quorum.QuorumPeerMain zoo.cfg
conf part adds classes and resources from the
conf directory to the classpath.
The classpath contains three entries:
zookeeper.jar, i.e. the Zookeeper JAR file in the current working directory
lib/log4j-1.2.15.jar, i.e. the Log4J JAR file in the
conf, i.e. all compiled classes and resources in the
The backslash is just there to indicate to the shell that the command continues on the next line.