private static ResourceFile findPrimaryApplicationRootDir() {
		String[] classpath = System.getProperty("java.class.path").split(File.pathSeparator);
		for (String pathEntry : classpath) {
			try {
				ResourceFile pathFile = new ResourceFile(new File(pathEntry).getCanonicalPath());
				while (pathFile != null && pathFile.exists()) {
					ResourceFile applicationPropertiesFile =
						new ResourceFile(pathFile, ApplicationProperties.PROPERTY_FILE);
					if (validateApplicationPropertiesFile(applicationPropertiesFile)) {
						return pathFile;
					}
					pathFile = pathFile.getParentFile();
				}
			}
			catch (IOException e) {
				Msg.error(ApplicationUtilities.class, "Invalid class path entry: " + pathEntry, e);
			}
		}
		return null;
	}
Finds the primary application root directory from the classpath.  The primary application
root directory must contain an application.properties file.  No other application root
directories may contain an application.properties file.

@return The primary application root directory, or null if it could not be found.
Ghidra/Framework/Utility/src/main/java/utility/application/ApplicationUtilities.java