Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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:

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?

like image 250
hbCyber Avatar asked Dec 04 '25 12:12

hbCyber


1 Answers

For windows:

@echo off
set cp="./*;./lib/*;../../*;../../lib/*"
java -cp %cp% org.apache.zookeeper.inspector.ZooInspector
like image 167
Alexander.Iljushkin Avatar answered Dec 07 '25 04:12

Alexander.Iljushkin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!