public File findSupportedJavaHomeFromCurrentJavaHome(AppConfig appConfig,
			JavaFilter javaFilter) {
		Set<File> potentialJavaHomeSet = new HashSet<>();
		String javaHomeProperty = System.getProperty("java.home");
		if (javaHomeProperty != null && !javaHomeProperty.isEmpty()) {
			File dir = new File(javaHomeProperty);
			if (javaFilter.equals(JavaFilter.ANY) || javaFilter.equals(JavaFilter.JDK_ONLY)) {
				potentialJavaHomeSet.add(getJdkHomeFromJavaHome(dir));
			}
			if (javaFilter.equals(JavaFilter.ANY) || javaFilter.equals(JavaFilter.JRE_ONLY)) {
				potentialJavaHomeSet.add(getJreHomeFromJavaHome(dir));
			}
			for (File potentialJavaHomeDir : potentialJavaHomeSet) {
				try {
					if (appConfig.isJavaVersionSupported(
						appConfig.getJavaVersion(potentialJavaHomeDir, javaFilter))) {
						return potentialJavaHomeDir;
					}
				}
				catch (ParseException | IOException e) {
					// skip it
				}
			}
		}
		return null;
	}
Returns the Java home directory corresponding to the current "java.home" system
property (if it supported).

@param appConfig The appConfig configuration that defines what we support.
@param javaFilter A filter used to restrict what kind of Java installations we search for.
@return The Java home directory corresponding to the current "java.home" system property.
  Could be null if the current "java.home" is not supported.
GhidraBuild/LaunchSupport/src/main/java/ghidra/launch/JavaFinder.java