code: public static String qsub(String input) {
          final CommandLine cmdLine = new CommandLine(COMMAND_QSUB);
          cmdLine.addArgument(input);
  
          final OutputStream out = new ByteArrayOutputStream();
          final OutputStream err = new ByteArrayOutputStream();
  
          DefaultExecuteResultHandler resultHandler;
          try {
              resultHandler = execute(cmdLine, null, out, err);
              resultHandler.waitFor(DEFAULT_TIMEOUT);
          } catch (ExecuteException e) {
              throw new PBSException("Failed to execute qsub command: " + e.getMessage(), e);
          } catch (IOException e) {
              throw new PBSException("Failed to execute qsub command: " + e.getMessage(), e);
          } catch (InterruptedException e) {
              throw new PBSException("Failed to execute qsub command: " + e.getMessage(), e);
          }
  
          final int exitValue = resultHandler.getExitValue();
          LOGGER.info("qsub exit value: " + exitValue);
          LOGGER.fine("qsub output: " + out.toString());
  
          if (exitValue != 0)
              throw new PBSException("Failed to submit job script " + input + ". Error output: " + err.toString());
  
          String jobId = out.toString();
          return jobId.trim();
      }
docs: PBS qsub command.
  <p>
  Equivalent to qsub [param]
  
  @param input job input file
  @return job id