throw new IOException("m.java_download_failed");
}
+ // on Windows, if the local JVM is in use, we will not be able to replace it with an
+ // updated JVM; we detect this by attempting to rename the java.dll to its same name, which
+ // will fail on Windows for in use files; hackery!
+ File javaLocalDir = new File(_app.getAppDir(), LaunchUtil.LOCAL_JAVA_DIR+File.separator);
+ File javaDll = new File(javaLocalDir, "bin" + File.separator + "java.dll");
+ if (javaDll.exists()) {
+ if (!javaDll.renameTo(javaDll)) {
+ log.info("Cannot update local Java VM as it is in use.");
+ return;
+ }
+ log.info("Can update local Java VM as it is not in use.");
+ }
+
reportTrackingEvent("jvm_start", -1);
updateStatus("m.downloading_java");