SET debugport=8000
SET consoleport=2400
SET jmxport=1088
+SET jvmMaxMemory=
SET extraJVMOpts=
SET consoleOpts=-console -consoleLog
SET PID=
)
GOTO :EOF
)
+ IF "!CARG:~0,4!"=="-Xmx" (
+ SET jvmMaxMemory=!CARG!
+ SHIFT
+ GOTO :LOOP
+ )
IF "!CARG:~0,2!"=="-D" (
SET extraJVMOpts=%extraJVMOpts% !CARG!
SHIFT
REM ECHO "DEBUG enabled suspended"
SET extraJVMOpts=%extraJVMOpts% -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=%debugport%
)
+
+IF "%jvmMaxMemory%"=="" (
+ SET jvmMaxMemory=-Xmx1G
+ ECHO *****************************************************************
+ ECHO JVM maximum memory was not defined. Setting maximum memory to 1G.
+ ECHO To define the maximum memory, specify the -Xmx setting on the
+ ECHO command line.
+ ECHO e.g. run.bat -Xmx1G
+ ECHO *****************************************************************"
+)
+
+SET extraJVMOpts=%extraJVMOpts% %jvmMaxMemory%
+
IF "%jmxEnabled%" NEQ "" (
REM ECHO "JMX enabled "
SET extraJVMOpts=%extraJVMOpts% -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=%jmxport% -Dcom.sun.management.jmxremote