public synchronized static void initializeGhidra() throws GhidraException {
		if (!Application.isInitialized()) {
			ApplicationLayout layout;
			try {
				layout = new GhidraTestApplicationLayout(ApplicationUtilities.getDefaultUserTempDir(
					new ApplicationProperties(ApplicationUtilities.findDefaultApplicationRootDirs())
							.getApplicationName()));
			}
			catch (IOException e) {
				throw new GhidraException(e);
			}
			HeadlessGhidraApplicationConfiguration config =
				new HeadlessGhidraApplicationConfiguration();
			config.setInitializeLogging(false);
			Application.initializeApplication(layout, config);
		}
		if (defaultLanguage == null) {
			LanguageService languageService = DefaultLanguageService.getLanguageService();
			try {
				defaultLanguage = languageService
						.getDefaultLanguage(Processor.findOrPossiblyCreateProcessor("DATA"));
			}
			catch (LanguageNotFoundException e) {
				throw new GhidraException("Can't load default language: DATA");
			}
		}
	}
Returns a string indication the program format. i.e. PE, elf, raw
Ghidra/Features/Base/src/main/java/ghidra/program/examiner/ProgramExaminer.java