@set ARGS=%1 %2 %3 %4 %5 %6 %7 %8 %9
@if "%DEBUG%" == "" @echo off
@rem ###########################################################################
@rem  startup mimdb-server
@rem 
@rem  Copyright (c) 2014 masahito suzuki, Inc. All Rights Reserved.
@rem ###########################################################################

@rem @set JAVA_HOME=
@set PATH=.\
@set MEMORY=256
@set PARM_SIZE=32

@set OPT=
@set OPT=%OPT% -XX:+UseOnStackReplacement -XX:+UseCompilerSafepoints
@set OPT=%OPT% -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:+UseBiasedLocking
@set OPT=%OPT% -XX:NewRatio=2 -XX:SurvivorRatio=8
@rem @set OPT=%OPT% -XX:CompileThreshold=1800
@set BASE_OPT=-server -Xms%MEMORY%m -Xmx%MEMORY%m -XX:PermSize=%PARM_SIZE%m -XX:MaxPermSize=%PARM_SIZE%m

if "%JAVA_HOME%" == ""  goto no_JAVA_HOME

@set JAVA_EXE=%JAVA_HOME%\bin\java.exe %BASE_OPT% %OPT%
goto next

:no_JAVA_HOME
set JAVA_EXE=java.exe %BASE_OPT% %OPT%

:next

set CLASSPATH=%PATH%mimdb-1.04.jar

set MAIN=org.maachang.mimdb.Server

:invocation
%JAVA_EXE% %MAIN% %ARGS%

:end
