private void writeLastRun() {
		// Write the Ghidra installation location to the "lastrun" file
		File settingsDir = Application.getUserSettingsDirectory();
		ResourceFile rootDir = Application.getApplicationRootDirectory();
		if (settingsDir != null && rootDir != null) {
			File lastRunFile = new File(settingsDir.getParentFile(), "lastrun");
			try {
				Files.writeString(lastRunFile.toPath(),
					rootDir.getParentFile().getCanonicalPath() + "\n");
			}
			catch (IOException e) {
				log.error("Failed to write 'lastrun' file", e);
			}
		}
	}
Main Ghidra application class. Creates
the .ghidra folder that contains the user preferences and tools if it does
not exist. Initializes JavaHelp and attempts to restore the last opened
project.
<p> A list of classes for plugins, data types, and language providers is
maintained so that a search of the classpath is not done every time
Ghidra is run. The list is maintained in the GhidraClasses.xml file
in the user's .ghidra folder. A search of the classpath is done if the
(1) GhidraClasses.xml file is not found, (2) the classpath is different
from when the last time Ghidra was run, (3) a class in the file was
not found,  or (4) a modification date specified in the classes file for
a jar file is older than the actual jar file's modification date.

<p><strong>Note</strong>: The Plugin path is a user preference that
indicates locations for where classes for plugins and data types should
be searched; the Plugin path can include jar files just like a classpath.
The Plugin path can be changed by using the <i>Edit Plugin Path</i> dialog,
displayed from the <i>Edit-&gt;Edit Plugin Path...</i> menu option on the main
Ghidra project window.

@see ghidra.GhidraLauncher
Ghidra/Features/Base/src/main/java/ghidra/GhidraRun.java