// extract bundle version info
final URLConnection launcherJarConn = launcherJar.openConnection();
launcherJarConn.setUseCaches(false);
final File tmp = new File(launchpadHome, "Loader_tmp_" + System.currentTimeMillis() + SharedConstants.LAUNCHER_JAR_REL_PATH);
spool(launcherJarConn.getInputStream(), tmp);
final FileBundleVersionInfo newVi = new FileBundleVersionInfo(tmp);
boolean installNewLauncher = true;
try {
if(!newVi.isBundle()) {
throw new IOException("New launcher jar is not a bundle, cannot get version info:" + launcherJar);
}
// Compare versions to decide whether to use the existing or new launcher jar
if (currentLauncherJarFile.exists()) {
final FileBundleVersionInfo currentVi = new FileBundleVersionInfo(currentLauncherJarFile);
if(!currentVi.isBundle()) {
throw new IOException("Existing launcher jar is not a bundle, cannot get version info:"
+ currentLauncherJarFile.getAbsolutePath());
}
String info = null;
if(currentVi.compareTo(newVi) == 0) {
info = "up to date";
installNewLauncher = false;
} else if(currentVi.compareTo(newVi) > 0) {
info = "more recent than ours";
installNewLauncher = false;
}
if(info != null) {