31.5.13

How to Run ZooInspector

Simply running zooInspector.cmd doesn't work. I did the following things and it works for me:

1. Create a pom.xml file like this

<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemalocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelversion>4.0.0</modelversion>
    <groupid>nonam</groupid>
    <artifactid>noname</artifactid>
    <version>0.0.1</version>

    <dependencies>
        <dependency>
            <groupid>org.apache.zookeeper</groupid>
            <artifactid>zookeeper</artifactid>
            <version>3.4.5</version>
            <exclusions>
                <exclusion>
                    <groupid>com.sun.jmx</groupid>
                    <artifactid>jmxri</artifactid>
                </exclusion>
                <exclusion>
                    <groupid>com.sun.jdmk</groupid>
                    <artifactid>jmxtools</artifactid>
                </exclusion>
                <exclusion>
                    <groupid>javax.jms</groupid>
                    <artifactid>jms</artifactid>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>
</project>

2. run mvn dependency:copy-dependencies
3. run the following command:

java -cp zookeeper-3.4.5-ZooInspector.jar;lib/*;target/dependency/* org.apache.zookeeper.inspector.ZooInspector

Put it into the cmd file if you like.

1 comment:

Unknown said...

Here's what I had to do to get ZooInspector to run on Mac OS X: http://superuser.do/zooinspector-on-os-x/