I really need your help. I`m trying to start the RunDirMulti.bat with parameters from Java. Here is the important part of my code:
List<String> command = new ArrayList<String>();
command.add(IDF_DIRECTORY + "RunDirMulti.bat");
command.add("C:/EnergyPlusV7-2-0/WeatherData/USA_CA_San.Francisco.Intl.AP.724940_TMY3");
command.add("4");
ProcessBuilder builder = new ProcessBuilder(command);
builder.directory(new
File(IDF_DIRECTORY));
String reportName = null;
String subDirectory = null;
Process process = null;
try {
process = builder.start();
InputStream is = process.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new
BufferedReader(isr);
String line;
while ((line = br.readLine()) != null) {
logger.debug(line);
}
If I start the RunDirMulti.bat without parameters, the processing works well. But if I pass the parameters, I always get the following error:
** Severe ** Weather Simulation requested, but no weather file attached.
** Severe ** GetNextEnvironment: Errors found in getting a new environment
** Fatal ** Error condition occurred. Previous Severe Errors cause
termination.
Can anybody help me? PS: If i just start it from the command line with parameters, it works too.
Thanks in advance!