In trying to do batch runs, I was following this listserv post.  It is a fantastic post!  However, the batch file has a typo.

The batch file should be:

@echo off
rem The version of Repast Simphony being used.
set VERSION=1.2.0
rem The installed path of Repast. Quotes may be necessary if there is a space character in the path.
set REPAST="C:\Program Files\RepastSimphony-1.2.0"
rem The installed path of Eclipse. Quotes may be necessary if there is a space character in the path.
set ECLIPSE="C:\Program Files\RepastSimphony-1.2.0\eclipse"
rem The plugins path of Eclipse.
set PLUGINS=%ECLIPSE%\plugins
rem The workspace containing the Repast model.
set WORKSPACE=%REPAST%\workspace
rem The name of the model. This might be case-sensitive. This is the name of your package. It should 
rem be the package at the top of all your .java files and match the "package" listed in your model.score 
rem file (when viewed as a text file).
set MODELNAME=myPackage
rem The folder of the model. This might be case-sensitive. This is the base folder of your project in 
rem the file system.
set MODELFOLDER=%WORKSPACE%\myProjectFolder
rem The file containing the batch parameters. For some additional information, see Repast documentation 
rem of batch parameters at http://repast.sourceforge.net/docs/reference/SIM/Batch%20Parameters.html and/or 
rem an example batch_params.xml file at http://www.pamelatoman.net/blog/2010/08/sample-batchparamsxml/.
set BATCHPARAMS=%MODELFOLDER%\batch\batch_params.xml

rem Execute in batch mode.
java -cp %PLUGINS%\repast.simphony.batch_%VERSION%\bin;%PLUGINS%\repast.simphony.runtime_%VERSION%\lib\*;
%PLUGINS%\repast.simphony.core_%VERSION%\lib\*;%PLUGINS%\repast.simphony.core_%VERSION%\bin;
%PLUGINS%\repast.simphony.bin_and_src_%VERSION%\*;%PLUGINS%\repast.simphony.score.runtime_%VERSION%\lib\*;
%PLUGINS%\repast.simphony.data_%VERSION%\lib\*;
%MODELFOLDER%\bin repast.simphony.batch.BatchMain -params %BATCHPARAMS% %MODELFOLDER%\%MODELNAME%.rs 

You can run this batch file from anywhere on the filesystem.

This came to light after fighting for significantly too much time with a RuntimeException that told me it “couldn’t find classes using supplied class loader”. It was telling me that it couldn’t find myPackage.ClassName on the very same path that had the compiled code! All the pointers toward this sort of error pointed to the model.score file — but model.score was not the problem here. The problem was that the model’s actual bin had not been added to the classpath.

For posterity, the exception I was getting was:

java.lang.RuntimeException: Couldn't find classes using supplied class loader: 
myPackage.ClassName on path: correct\path\to\project\bin
at repast.simphony.scenario.ScenarioLoader.getAgentClasses(ScenarioLoader.java:274)
at repast.simphony.scenario.ScenarioLoader.load(ScenarioLoader.java:160)
at repast.simphony.batch.BatchRunner.run(BatchRunner.java:87)
at repast.simphony.batch.BatchMain.run(BatchMain.java:119)
at repast.simphony.batch.BatchMain.main(BatchMain.java:141)
usage: repast.simphony.batch.BatchMain [options] target
Where target is the path to a scenario file or the fully qualified name of a class 
that implements repast.simphony.batch.BatchScenarioCreator.
-help            print this message
-interactive     specifies if the batch mode is interactive
-opt <file>      use optimizable parameter sweeper with given optimizing properties file
-params <file>   use given parameter sweep file