How to run ZooInspector from Windows
apache-zookeeper, java, windows
Solution
For windows:
@echo off
set cp="./*;./lib/*;../../*;../../lib/*"
java -cp %cp% org.apache.zookeeper.inspector.ZooInspector
Problem
Here's what I did: - Downloaded Apache ZooKeeper 3.4.6 (.tar file), extracted to C:\cygwin\home\user\zookeeper-3.4.6\ - Ran ant at the root of the ZooKeeper folder (C:\cygwin\home\user\zookeeper-3.4.6) - Navigated to C:\cygwin\home\user\zookeeper-3.4.6\contrib\ZooInspector\ - Ran ant, and I get the following error: Output: ``` Buildfile: C:\cygwin\home\Jean\zookeeper-3.4.6\contrib\ZooInspector\build.xml BUILD FAILED C:\cygwin\home\user\zookeeper-3.4.6\contrib\ZooInspector\build.xml:19: Cannot find C:\cygwin\home\user\zookeeper-3.4.6\contrib\build-contrib.xml imported from C:\cygwin\home\user\zookeeper-3.4.6\contrib\ZooInspector\build.xml Total time: 0 seconds ``` This leaves me with no .cmd or .sh file to execute. How come the build-contrib.xml file isn't there? Also, I noticed that there seems to be an already-compiled ZooInspector JAR file: zookeeper-3.4.6-ZooInspector.jar. However, attempting to run it with the following command yields failure too: ``` $ java -cp zookeeper-3.4.6-ZooInspector.jar:lib/* org.apache.zookeeper.inspector.ZooInspector Error: Could not find or load main class org.apache.zookeeper.inspector.ZooInspector ``` This is a bit frustrating -- setting up the ZooKeeper server was straightforward but for some reason I just can't figure out how to run this standalone GUI. What am I missing?