From 00a927b1785074317e27a63f9347a073eff71781 Mon Sep 17 00:00:00 2001 From: jxwuyi Date: Mon, 14 Jul 2014 22:32:41 -0700 Subject: [PATCH 1/4] remove default memory setting --- iblog.bat | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/iblog.bat b/iblog.bat index 4fc34709..eedf1775 100644 --- a/iblog.bat +++ b/iblog.bat @@ -1,13 +1,12 @@ @echo off -if "%1"=="" set JAVA_OPTS=-Xmx4096M set BLOG_HOME=%~dp0.. echo Starting Interative Shell for BLOG if exist "%BLOG_HOME%\bin\iblog.scala" ( set CPATH="%BLOG_HOME%\lib\java-cup-11b.jar;%BLOG_HOME%\lib\*" - scala -cp %CPATH% -i "%BLOG_HOME%\bin\iblog.scala" -J%JAVA_OPTS% %* + scala -cp %CPATH% -i "%BLOG_HOME%\bin\iblog.scala" %* ) else ( set BLOG_DEVELOP_HOME=%~dp0 if NOT exist "%BLOG_DEVELOP_HOME%target\universal\stage\" (sbt\sbt.bat stage) set CPATH="%BLOG_DEVELOP_HOME%target\universal\stage\lib\java-cup-11b.jar;%BLOG_DEVELOP_HOME%target\universal\stage\lib\*" - scala -cp %CPATH% -i "%BLOG_DEVELOP_HOME%src\main\scala\iblog.scala" -J%JAVA_OPTS% %* + scala -cp %CPATH% -i "%BLOG_DEVELOP_HOME%src\main\scala\iblog.scala" %* ) From ba8c722866c415f2b2f65d78afc91e4c25622904 Mon Sep 17 00:00:00 2001 From: td11 Date: Tue, 22 Jul 2014 17:34:52 -0700 Subject: [PATCH 2/4] Change the iblog.bat so that the memory setting works if it is inputed as the first parameter. --- iblog.bat | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/iblog.bat b/iblog.bat index eedf1775..38b26644 100644 --- a/iblog.bat +++ b/iblog.bat @@ -1,12 +1,17 @@ @echo off +set Param1=%1 +if "%Param1:~0,6%"=="-J-Xmx" ( + set JAVA_OPTS=%Param1:~2% + set Param1= +) set BLOG_HOME=%~dp0.. echo Starting Interative Shell for BLOG if exist "%BLOG_HOME%\bin\iblog.scala" ( set CPATH="%BLOG_HOME%\lib\java-cup-11b.jar;%BLOG_HOME%\lib\*" - scala -cp %CPATH% -i "%BLOG_HOME%\bin\iblog.scala" %* + scala -cp %CPATH% -i "%BLOG_HOME%\bin\iblog.scala" -J%JAVA_OPTS% %Param1% %2 %3 %4 %5 %6 %7 %8 %9 ) else ( set BLOG_DEVELOP_HOME=%~dp0 if NOT exist "%BLOG_DEVELOP_HOME%target\universal\stage\" (sbt\sbt.bat stage) set CPATH="%BLOG_DEVELOP_HOME%target\universal\stage\lib\java-cup-11b.jar;%BLOG_DEVELOP_HOME%target\universal\stage\lib\*" - scala -cp %CPATH% -i "%BLOG_DEVELOP_HOME%src\main\scala\iblog.scala" %* + scala -cp %CPATH% -i "%BLOG_DEVELOP_HOME%src\main\scala\iblog.scala" -J%JAVA_OPTS% %Param1% %2 %3 %4 %5 %6 %7 %8 %9 ) From 04b3e6e93575ed846732372d1d7368ecd1f3edbb Mon Sep 17 00:00:00 2001 From: td11 Date: Tue, 22 Jul 2014 17:54:01 -0700 Subject: [PATCH 3/4] Change the document for iblog.bat. --- docs/content/pages/iblog.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/content/pages/iblog.md b/docs/content/pages/iblog.md index 771fb474..12a5cd04 100644 --- a/docs/content/pages/iblog.md +++ b/docs/content/pages/iblog.md @@ -15,9 +15,14 @@ http://www.scala-lang.org/. # Introduction -Start the BLOG interactive shell using the `iblog` command. In the examples -below, lines prefixed with `scala>` are what you type into the shell. Lines -without that prefix are output printed by the shell. +Start the BLOG interactive shell using the `iblog` command. You could change the maximum Java heap size by typing iblog `-J-Xmx`. For example, if you type + +```text +iblog -J-Xmx1024M +``` + +Then the maximum Java heap size will be set to 1024M. +In the examples below, lines prefixed with `scala>` are what you type into the shell. Lines without that prefix are output printed by the shell. # Example: Debugging Likelihood Weighting From cc018bd9a5a0220ade0e34d980ee31524e89bbbf Mon Sep 17 00:00:00 2001 From: td11 Date: Tue, 22 Jul 2014 17:56:20 -0700 Subject: [PATCH 4/4] Fix a typo. --- docs/content/pages/iblog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/pages/iblog.md b/docs/content/pages/iblog.md index 12a5cd04..82a9de5d 100644 --- a/docs/content/pages/iblog.md +++ b/docs/content/pages/iblog.md @@ -15,7 +15,7 @@ http://www.scala-lang.org/. # Introduction -Start the BLOG interactive shell using the `iblog` command. You could change the maximum Java heap size by typing iblog `-J-Xmx`. For example, if you type +Start the BLOG interactive shell using the `iblog` command. You could change the maximum Java heap size by typing `iblog -J-Xmx`. For example, if you type ```text iblog -J-Xmx1024M