Ver código fonte

ZOOKEEPER-2548: zooInspector does not start on Windows (Arshad Mohammad via phunt)

git-svn-id: https://svn.apache.org/repos/asf/zookeeper/trunk@1759719 13f79535-47bb-0310-9956-ffa450edef68
Patrick D. Hunt 8 anos atrás
pai
commit
bcb0d88993
2 arquivos alterados com 23 adições e 17 exclusões
  1. 3 0
      CHANGES.txt
  2. 20 17
      src/contrib/zooinspector/zooInspector.cmd

+ 3 - 0
CHANGES.txt

@@ -359,6 +359,9 @@ BUGFIXES:
   ZOOKEEPER-2152: Intermittent failure in TestReconfig.cc
   (Michael Han via phunt)
 
+  ZOOKEEPER-2548: zooInspector does not start on Windows
+  (Arshad Mohammad via phunt)
+
 IMPROVEMENTS:
   ZOOKEEPER-2024 Major throughput improvement with mixed workloads (Kfir Lev-Ari via shralex)
 

+ 20 - 17
src/contrib/zooinspector/zooInspector.cmd

@@ -1,18 +1,21 @@
-#!/bin/sh
+@echo off
+@rem Licensed to the Apache Software Foundation (ASF) under one or more
+@rem contributor license agreements.  See the NOTICE file distributed with
+@rem this work for additional information regarding copyright ownership.
+@rem The ASF licenses this file to You under the Apache License, Version 2.0
+@rem (the "License"); you may not use this file except in compliance with
+@rem the License.  You may obtain a copy of the License at
+@rem
+@rem     http://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
 
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-java -cp "zookeeper-dev-ZooInspector.jar;lib\*;lib" org.apache.zookeeper.inspector.ZooInspector
+set CLASSPATH=lib\*;lib
+for /F %%f in ('dir /b "%~dp0%\*.jar" 2^>nul') do (
+   set CLASSPATH=%%f;%CLASSPATH%
+)
+java -cp "%CLASSPATH%" org.apache.zookeeper.inspector.ZooInspector