flink-instrumentation/workspace/flink-1.4.1-instrumented/flink-1.4.1/flink-clients/src/main/java/org/apache/flink/client/CliFrontend.java
/**
	 * Creates a Packaged program from the given command line options.
	 *
	 * @return A PackagedProgram (upon success)
	 * @throws java.io.FileNotFoundException
	 * @throws org.apache.flink.client.program.ProgramInvocationException
	 */
Creates a Packaged program from the given command line options.
Creates a Packaged program from the given command line options .
protected PackagedProgram buildProgram(ProgramOptions options)
			throws FileNotFoundException, ProgramInvocationException {
		String[] programArgs = options.getProgramArgs();
		String jarFilePath = options.getJarFilePath();
		List<URL> classpaths = options.getClasspaths();
		if (jarFilePath == null) {
			throw new IllegalArgumentException("The program JAR file was not specified.");
		}
		File jarFile = new File(jarFilePath);
		if (!jarFile.exists()) {
			throw new FileNotFoundException("JAR file does not exist: " + jarFile);
		}
		else if (!jarFile.isFile()) {
			throw new FileNotFoundException("JAR file is not a file: " + jarFile);
		}
		String entryPointClass = options.getEntryPointClassName();
		PackagedProgram program = entryPointClass == null ?
				new PackagedProgram(jarFile, classpaths, programArgs) :
				new PackagedProgram(jarFile, classpaths, entryPointClass, programArgs);
		program.setSavepointRestoreSettings(options.getSavepointRestoreSettings());
		return program;
	}
protected PackagedProgram buildProgram ( ProgramOptions options ) throws FileNotFoundException , ProgramInvocationException { String [ ] programArgs = options . getProgramArgs ( ) ; String jarFilePath = options . getJarFilePath ( ) ; List < URL > classpaths = options . getClasspaths ( ) ; if ( jarFilePath == null ) { throw new IllegalArgumentException ( "The program JAR file was not specified." ) ; } File jarFile = new File ( jarFilePath ) ; if ( ! jarFile . exists ( ) ) { throw new FileNotFoundException ( "JAR file does not exist: " + jarFile ) ; } else if ( ! jarFile . isFile ( ) ) { throw new FileNotFoundException ( "JAR file is not a file: " + jarFile ) ; } String entryPointClass = options . getEntryPointClassName ( ) ; PackagedProgram program = entryPointClass == null ? new PackagedProgram ( jarFile , classpaths , programArgs ) : new PackagedProgram ( jarFile , classpaths , entryPointClass , programArgs ) ; program . setSavepointRestoreSettings ( options . getSavepointRestoreSettings ( ) ) ; return program ; }
Creates a Packaged program from the given command line options.
Creates a Packaged program from the given command line options .
// Check if JAR file exists // Get assembler class