public File doExport(final ILaunchConfiguration pConfiguration, List lFiles) throws Exception
  {
    mainClass = pConfiguration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, "");

    srcPath = pConfiguration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_SOURCE_PATH, "");

    srcPath = pConfiguration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_SOURCE_PATH, srcPath);

    if (srcPath.length() == 0)
      srcPath = projectLocation + SLASH + "src" + SLASH;

    String vmArgsAttr = pConfiguration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, "");
    if (vmArgsAttr != null)
      vmArgs = vmArgsAttr;

    String progArgsAttr = pConfiguration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, "");
    if (progArgsAttr != null)
      progArgs = progArgsAttr;

    sketchName = mainClass.substring(mainClass.lastIndexOf(".") + 1);
    relPathToJava = mainClass.replaceAll("\\.", "\\" + SLASH) + ".java";
    fullPathToJava = srcPath + relPathToJava;

    // Get the program contents as a String
    mainProgram = P5ExportUtils.loadFile(new FileInputStream(fullPathToJava));
    hasMain = Regex.getInstance().test(MAIN_PATT, mainProgram);

    // dumpVars();

    return exportType.doExport(this, pConfiguration, workDir, lFiles);
  }