### Question:
JavaHomeUtil { public static String getJavaHomeDir() { if (FOUND_JAVA_HOME != null) { return FOUND_JAVA_HOME; } String javaHome = System.getProperty("java.home"); if (JavaVersionUtil.isLessThanJava9()) { File toolsJar = new File(javaHome, "lib/tools.jar"); if (!toolsJar.exists()) { toolsJar = new File(javaHome, "../lib/tools.jar"); } if (!toolsJar.exists()) { toolsJar = new File("../../lib/tools.jar"); } if (!toolsJar.exists()) { throw new IllegalArgumentException("Can not find tools.jar under java home"); } FOUND_JAVA_HOME = javaHome; } else { FOUND_JAVA_HOME = javaHome; } return FOUND_JAVA_HOME; }  static String getJavaHomeDir(); static File getToolsJar();  }### Answer:
@Test void getJavaHomeDir() { System.out.println(JavaHomeUtil.getJavaHomeDir()); }