comparison bin/cassandra-cli.bat @ 0:d485154379c8 default tip

apache-cassandra-0.6.0-rc1-src
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Fri, 02 Apr 2010 13:36:02 +0900
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:d485154379c8
1 @REM
2 @REM Licensed to the Apache Software Foundation (ASF) under one or more
3 @REM contributor license agreements. See the NOTICE file distributed with
4 @REM this work for additional information regarding copyright ownership.
5 @REM The ASF licenses this file to You under the Apache License, Version 2.0
6 @REM (the "License"); you may not use this file except in compliance with
7 @REM the License. You may obtain a copy of the License at
8 @REM
9 @REM http://www.apache.org/licenses/LICENSE-2.0
10 @REM
11 @REM Unless required by applicable law or agreed to in writing, software
12 @REM distributed under the License is distributed on an "AS IS" BASIS,
13 @REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 @REM See the License for the specific language governing permissions and
15 @REM limitations under the License.
16
17
18 @echo off
19 if "%OS%" == "Windows_NT" setlocal
20
21 if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%CD%
22 if NOT DEFINED JAVA_HOME goto err
23
24 REM Ensure that any user defined CLASSPATH variables are not used on startup
25 set CLASSPATH=
26
27 REM For each jar in the CASSANDRA_HOME lib directory call append to build the CLASSPATH variable.
28 for %%i in (%CASSANDRA_HOME%\lib\*.jar) do call :append %%~fi
29 goto okClasspath
30
31 :append
32 set CLASSPATH=%CLASSPATH%;%1%2
33 goto :eof
34
35 :okClasspath
36 REM Include the build\classes directory so it works in development
37 set CASSANDRA_CLASSPATH=%CLASSPATH%;%CASSANDRA_HOME%\build\classes
38 goto runCli
39
40 :runCli
41 echo Starting Cassandra Client
42 "%JAVA_HOME%\bin\java" -cp "%CASSANDRA_CLASSPATH%" org.apache.cassandra.cli.CliMain %*
43 goto finally
44
45 :err
46 echo The JAVA_HOME environment variable must be set to run this program!
47 pause
48
49 :finally
50
51 ENDLOCAL