}
/**
+ * Initial logging information helper for various versions output
+ *
+ * @param prefix
+ * @param value
+ * @param defaultValue
+ */
+ private static void appendIfNotNull(StringBuilder sb, String prefix,
+ String value, String suffix, String defaultValue)
+ {
+ if (value == null && defaultValue == null)
+ {
+ return;
+ }
+ String line = prefix + (value != null ? value : defaultValue) + suffix;
+ sb.append(line);
+ }
+
+ /**
*
* @return Jalview version, build details and JVM platform version for console
*/
sb.append("\n");
sb.append(System.getProperty("os.arch") + " " + System.getProperty("os.name") + " " + System.getProperty("os.version"));
sb.append("\n");
- sb.append("Install4j version: "
- + System.getProperty("sys.install4jVersion"));
- sb.append("\n");
- sb.append("Install4j template version: "
- + System.getProperty("installer_template_version"));
- sb.append("\n");
- sb.append(
- "Launcher version: " + System.getProperty("launcher_version"));
- sb.append("\n");
+ appendIfNotNull(sb, "Install4j version: ",
+ System.getProperty("sys.install4jVersion"), "\n", null);
+ appendIfNotNull(sb, "Install4j template version: ",
+ System.getProperty("installer_template_version"), "\n", null);
+ appendIfNotNull(sb, "Launcher version: ",
+ System.getProperty("launcher_version"), "\n", null);
if (jalview.bin.Cache.getDefault("VERSION", "TEST").equals("DEVELOPMENT")) {
- sb.append("Getdown appdir: " + System.getProperty("getdownappdir"));
- sb.append("\n");
- sb.append("Java home: " + System.getProperty("java.home"));
- sb.append("\n");
+ appendIfNotNull(sb, "Getdown appdir: ",
+ System.getProperty("getdownappdir"), "\n", null);
+ appendIfNotNull(sb, "Java home: ", System.getProperty("java.home"),
+ "\n", "unknown");
}
return sb.toString();
}
{
System.setSecurityManager(null);
System.out
- .println("Java version: " + System.getProperty("java.version"));
+ .println("Java version: "
+ + System.getProperty("java.version"));
System.out.println("Java Home: " + System.getProperty("java.home"));
System.out.println(System.getProperty("os.arch") + " "
+ System.getProperty("os.name") + " "
+ System.getProperty("os.version"));
- System.out.println("Install4j version: "
- + System.getProperty("sys.install4jVersion"));
- System.out.println("Install4j template version: "
- + System.getProperty("installer_template_version"));
- System.out.println(
- "Launcher version: " + System.getProperty("launcher_version"));
+ String val = System.getProperty("sys.install4jVersion");
+ if (val != null) {
+ System.out.println("Install4j version: " + val);
+ }
+ val = System.getProperty("installer_template_version");
+ if (val != null) {
+ System.out.println("Install4j template version: " + val);
+ }
+ val = System.getProperty("launcher_version");
+ if (val != null) {
+ System.out.println("Launcher version: " + val);
+ }
// report Jalview version
Cache.loadBuildProperties(true);
BioJsHTMLOutput.updateBioJS();
}
+ Cache.log.info("CHECKPOINT 1");
// Move any new getdown-launcher-new.jar into place over old
// getdown-launcher.jar
String appdirString = System.getProperty("getdownappdir");
DataSourceType protocol = null;
FileLoader fileLoader = new FileLoader(!headless);
+ Cache.log.info("CHECKPOINT 2");
String groovyscript = null; // script to execute after all loading is
// completed one way or another
// extract groovy argument and execute if necessary