public void run() { try { JobTemplate jt; do { jt = this.createJobTemplateException(); } while (this.jobTemplateException); String cwd; jt.setWorkingDirectory(java.lang.System.getProperty("user.dir")); cwd = jt.getWorkingDirectory(); System.out.println("The working directory is: " + cwd); String name; jt.setJobName(this.name); name = jt.getJobName(); System.out.println("The jobTemplate name is: " + name); jt.setRemoteCommand(this.executable); jt.setArgs(this.args); jt.setOutputPath("stdout." + GridWaySession.GW_JOB_ID); jt.setErrorPath("stderr." + GridWaySession.GW_JOB_ID); for (int i = 0; i < this.nJobs; i++) { if (jt != null) { String id = this.session.runJob(jt); System.out.println("Job successfully submitted ID: " + id); } } } catch (Exception e) { this.setException(e); } }