/** * Finds <b>tools.jar</b>. Returns <code>null</code> if does not exist. */ public static File findToolsJar() { String javaHome = SystemUtil.javaHome(); if (javaHome == null) { return null; } String tools = new File(javaHome).getAbsolutePath() + File.separatorChar + "lib" + File.separatorChar + "tools.jar"; File toolsFile = new File(tools); if (toolsFile.exists()) { return toolsFile; } return null; }