Add overwrite option to fork lift tool
[voldemort/jeffpc.git] / bin / voldemort-server.bat
blob0cb32f8f7d1afcf79bbc498f5c9369dc26486453
1 @echo off
3 REM
4 REM Copyright 2013 Carlos Tasada
5 REM
6 REM Licensed under the Apache License, Version 2.0 (the "License");
7 REM you may not use this file except in compliance with the License.
8 REM You may obtain a copy of the License at
9 REM
10 REM http://www.apache.org/licenses/LICENSE-2.0
11 REM
12 REM Unless required by applicable law or agreed to in writing, software
13 REM distributed under the License is distributed on an "AS IS" BASIS,
14 REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 REM See the License for the specific language governing permissions and
16 REM limitations under the License.
17 REM
18 REM ** This Windows BAT file is not tested with each Voldemort release. **
20 set argC=0
21 for %%a in (%*) do set /a argC+=1
22 if %argC% leq 2 goto :continue
23 echo USAGE: bin/voldemort-server.bat [voldemort_home_dir] [voldemort_config_dir]
24 goto :eof
25 :continue
27 setlocal
29 SET BASE_DIR=%~dp0..
30 SET CLASSPATH=.
32 set VOLDEMORT_CONFIG_DIR=%1%/config
34 for %%j in ("%BASE_DIR%\dist\*.jar") do (call :append_classpath "%%j")
35 for %%j in ("%BASE_DIR%\contrib\*\lib\*.jar") do (call :append_classpath "%%j")
36 for %%j in ("%BASE_DIR%\lib\*.jar") do (call :append_classpath "%%j")
37 set CLASSPATH=%CLASSPATH%;"%BASE_DIR%\dist\resources"
38 goto :run
40 :append_classpath
41 set CLASSPATH=%CLASSPATH%;%1
42 goto :eof
44 :run
45 if "%VOLD_OPTS%" == "" set "VOLD_OPTS=-Xmx2G -server -Dcom.sun.management.jmxremote"
46 java %VOLD_OPTS% -cp %CLASSPATH% voldemort.server.VoldemortServer %*
48 endlocal
49 :eof