public Program importProgram(File file, Class<? extends Loader> loaderClass)
			throws CancelledException, DuplicateNameException, InvalidNameException,
			VersionException, IOException {
		MessageLog messageLog = new MessageLog();
		LoadResults<Program> loadResults = AutoImporter.importByUsingSpecificLoaderClass(file,
			project, null, loaderClass, null, this, messageLog, MONITOR);
		Program program = loadResults.getPrimaryDomainObject();
		loadResults.releaseNonPrimary(this);
		initializeProgram(program, false);
		return program;
	}
Executes the give command on the program.

@param cmd
           the command to be applied to the program.
@param program
           the program on which the command is to be applied.
Ghidra/Features/Base/src/main/java/ghidra/base/project/GhidraProject.java