Fix exported simulation: add jsyntaxpane JAR, start simulation with maximum speed

This commit is contained in:
Jens Dede 2014-04-26 16:00:23 +02:00
parent 2ab6355415
commit 823abf9d94
1 changed files with 11 additions and 2 deletions

View File

@ -187,7 +187,15 @@ public class ExecuteJAR {
logger.info("Starting simulation");
Cooja.setLookAndFeel();
Cooja.quickStartSimulationConfig(new File(executeDir, SIMCONFIG_FILENAME), false, null);
Simulation sim = Cooja.quickStartSimulationConfig(new File(executeDir, SIMCONFIG_FILENAME), false, null);
if (sim != null){
/* Set simulation speed to maximum and start simulation */
sim.setSpeedLimit(null);
sim.startSimulation();
} else {
logger.fatal("Cannot load simulation, aborting");
System.exit(1);
}
}
/**
@ -284,7 +292,8 @@ public class ExecuteJAR {
/* Unpacking COOJA core JARs */
String[] coreJARs = new String[] {
"tools/cooja/lib/jdom.jar", "tools/cooja/lib/log4j.jar", "tools/cooja/dist/cooja.jar"
"tools/cooja/lib/jdom.jar", "tools/cooja/lib/log4j.jar",
"tools/cooja/dist/cooja.jar", "tools/cooja/lib/jsyntaxpane.jar"
};
for (String jar: coreJARs) {
File jarFile = new File(Cooja.getExternalToolsSetting("PATH_CONTIKI"), jar);