deleteLogs(base);
AbstractLanguageHandler handler = Lang.getByFileName(script).getHandler();
AbstractGrinderClassPathProcessor classPathProcessor = handler.getClassPathProcessor();
GrinderProperties properties = new GrinderProperties();
PropertyBuilder builder = new PropertyBuilder(properties, new Directory(base), securityEnabled, hostString,
NetworkUtils.getLocalHostName());
properties.setInt("grinder.agents", 1);
properties.setInt("grinder.processes", 1);
properties.setInt("grinder.threads", 1);
properties.setBoolean("grinder.script.validation", true);
String grinderJVMClassPath = classPathProcessor.buildForemostClasspathBasedOnCurrentClassLoader(LOGGER)
+ File.pathSeparator + classPathProcessor.buildPatchClasspathBasedOnCurrentClassLoader(LOGGER)
+ File.pathSeparator + builder.buildCustomClassPath(true);
properties.setProperty("grinder.jvm.classpath", grinderJVMClassPath);
LOGGER.info("grinder.jvm.classpath : {} ", grinderJVMClassPath);
AgentIdentityImplementation agentIdentity = new AgentIdentityImplementation("validation");
agentIdentity.setNumber(0);
String newClassPath = classPathProcessor.buildClasspathBasedOnCurrentClassLoader(LOGGER);
LOGGER.debug("validation class path " + newClassPath);
Properties systemProperties = new Properties();
systemProperties.put("java.class.path", base.getAbsolutePath() + File.pathSeparator + newClassPath);
Directory workingDirectory = new Directory(base);
String buildJVMArgumentWithoutMemory = builder.buildJVMArgumentWithoutMemory();
LOGGER.info("jvm args : {} ", buildJVMArgumentWithoutMemory);
final WorkerProcessCommandLine workerCommandLine = new WorkerProcessCommandLine(properties,
systemProperties, buildJVMArgumentWithoutMemory, workingDirectory);