public void export(@Nonnull JvmClassInfo classInfo) {
		// Prompt a path for the user to write to.
		ObservableString lastClassExportDir = recentFilesConfig.getLastClassExportDirectory();
		File lastExportDir = lastClassExportDir.unboxingMap(File::new);
		FileChooser chooser = new FileChooserBuilder()
				.setInitialFileName(StringUtil.shortenPath(classInfo.getName()) + ".class")
				.setInitialDirectory(lastExportDir)
				.setFileExtensionFilter("Java Class", "*.class")
				.setTitle(Lang.get("dialog.file.export"))
				.build();
		File selectedPath = chooser.showSaveDialog(null);

		// Selected path is null, meaning user closed out of file chooser.
		// Cancel export.
		if (selectedPath == null)
			return;

		// Update last export dir for classes.
		lastClassExportDir.setValue(selectedPath.getParent());

		// Write to path.
		try {
			Path exportPath = selectedPath.toPath();
			Files.write(exportPath, classInfo.getBytecode());
		} catch (IOException ex) {
			logger.error("Failed to export class to path '{}'", selectedPath, ex);
			ErrorDialogs.show(
					Lang.getBinding("dialog.error.exportclass.title"),
					Lang.getBinding("dialog.error.exportclass.header"),
					Lang.getBinding("dialog.error.exportclass.content"),
					ex
			);
		}
	}
Export the given class.

@param classInfo
		Class to export.
recaf-ui/src/main/java/software/coley/recaf/workspace/PathExportingManager.java