/** * Return library information corresponding to the specified install * location. If the information does not exist, create it using the given Java * executable. * @param javaHome the Java home folder * @param javaExecutable the Java executable file * @return the {@link LibraryInfo} for the home and executable path or an empty object, never <code>null</code> */ protected synchronized LibraryInfo getLibraryInfo(File javaHome, File javaExecutable) { String installPath = javaHome.getAbsolutePath(); LibraryInfo info = LaunchingPlugin.getLibraryInfo(installPath); if (info == null || LaunchingPlugin.timeStampChanged(installPath)) { info = fgFailedInstallPath.get(installPath); if (info == null) { info = generateLibraryInfo(javaHome, javaExecutable); if (info == null) { info = getDefaultLibraryInfo(javaHome); fgFailedInstallPath.put(installPath, info); } else { // only persist if we were able to generate information - see bug 70011 LaunchingPlugin.setLibraryInfo(installPath, info); } } } return info; }
LibraryInfo libInfo; if (javaExecutable == null) { libInfo = getDefaultLibraryInfo(installLocation); } else { libInfo = getLibraryInfo(installLocation, javaExecutable);
LibraryInfo libInfo; if (javaExecutable == null) { libInfo = getDefaultLibraryInfo(installLocation); } else { libInfo = getLibraryInfo(installLocation, javaExecutable);
info = getDefaultLibraryInfo(javaHome); fgFailedInstallPath.put(installPath, info); } else {