@Override
	protected File getJreHomeFromJavaHome(File javaHomeDir) {
		if (javaHomeDir.isDirectory() && !javaHomeDir.getName().equals("jre")) {
			for (File dir : javaHomeDir.listFiles()) {
				if (dir.isDirectory() && dir.getName().equals("jre")) {
					return dir;
				}
			}
		}
		return javaHomeDir;
	}
Class responsible for finding Java installations on a Linux system.
GhidraBuild/LaunchSupport/src/main/java/ghidra/launch/LinuxJavaFinder.java