hbCyber hbCyber - 1 year ago 706
Java Question

How to run ZooInspector from Windows

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:


Buildfile: C:\cygwin\home\Jean\zookeeper-3.4.6\contrib\ZooInspector\build.xml

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?

Answer Source

For windows:

@echo off
set cp="./*;./lib/*;../../*;../../lib/*"
java -cp %cp% org.apache.zookeeper.inspector.ZooInspector
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download