// getdown-launcher.jar should not be in main application class path so the main application can move it when updated. Listed as a resource so it gets updated.
//getdownTextString += "class = " + file(getdownLauncher).getName() + "\n"
- getdownTextString += "resource = " + file(getdownLauncher).getName() + "\n"
+ getdownTextString += "resource = " + getdown_launcher_new + "\n"
getdownTextString += "class = " + mainClass + "\n"
def getdown_txt = file(project.ext.getdownWebsiteDir + "/getdown.txt")
}
copy {
+ from project.ext.getdownWebsiteDir
+ into project.ext.getdownWebsiteDir
+ include(file(getdownLauncher).getName())
+ rename(file(getdownLauncher).getName(), getdown_launcher_new)
+ }
+
+ copy {
from getdownLauncher
into project.ext.getdownFilesDir
}
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");
}
if (abort) System.exit(-1);
+ log.info("Starting....");
try
{
jalview.bin.StartupNotificationListener.setListener();
#getdown_j11lib_dir = j11lib
getdown_files_dir = getdown/files
getdown_launcher = getdown/lib/getdown-launcher.jar
+getdown_launcher_new = getdown-launcher-new.jar
getdown_core = getdown/lib/getdown-core-1.8.3-SNAPSHOT.jar
getdown_base_txt = getdown/files/getdown.txt
getdown_txt_title = Jalview
getdown_txt_ui.mac_dock_icon = resources/images/jalview_logos.ico
getdown_alt_java8_min_version = 01080000
getdown_alt_java11_min_version = 11000000
-getdown_alt_java11_txt_multi_java_location = [windows-amd64] /getdown/jre/windows-jre11.tgz,[linux-amd64] /getdown/jre/linux-jre11.tgz,[mac os x] /getdown/jre/macos-jre11.tgz
+getdown_alt_java11_txt_multi_java_location = [windows-amd64] /getdown/jre/windows-jre11.jar,[linux-amd64] /getdown/jre/linux-jre11.tgz,[mac os x] /getdown/jre/macos-jre11.tgz
getdown_alt_java8_txt_multi_java_location = [windows-amd64] /getdown/jre/windows-jre1.8.tgz,[linux-amd64] /getdown/jre/linux-jre1.8.tgz,[mac os x] /getdown/jre/macos-jre1.8.tgz
JRE_installs = /Users/bsoares/Java/installs
Windows_JRE8 = OpenJDK8U-jdk_x64_windows_hotspot_8u202b08/jdk8u202-b08