+JABA 1 is to keep working, later when 2 is ready replace jabaws mapping to point to \r
+JABA 2 but provide a link to JABA 1. \r
+\r
+install JABA 1 stat server \r
+\r
++Get path to Java executable from JAVA_HOME ? (for Jronn AACon) \r
++Describe requirements \r
+\r
+Python > 2.2\r
+Perl > 5.0\r
+Java > 6\r
+\r
+For compilation \r
+C++\r
+C\r
+Gnu make\r
+\r
+Webpage for testing web services?\r
+\r
+Crawler is to update DB records if the directory is not found to prevent link \r
+generation for stats. \r
+\r
+ \r
+\r
+ Help information? - relative - client to add host and context info\r
+ statistics - result files \r
+ Check progress tracking on large sequence. \r
#probcons.limits.file=conf/settings/ProbconsLimits.xml\r
#probcons.cluster.settings=-l h_cpu=24:00:00 -l h_vmem=6000M -l ram=6000M\r
\r
-### Jronn configuration ### \r
-local.jronn.bin.windows=D:\\Java\\jdk1.6.0_24\\bin\\java.exe \r
-local.jronn.bin=/sw/java/latest/bin/java\r
+### Jronn configuration ###\r
+# If no local path are specified, Java is loaded from JAVA_HOME environment \r
+# variable for local execution \r
+#local.jronn.bin.windows=D:\\Java\\jdk1.6.0_24\\bin\\java.exe \r
+#local.jronn.bin=/sw/java/latest/bin/java\r
cluster.jronn.bin=/sw/java/latest/bin/java\r
jronn.jar.file=binaries/windows/jronn3.1.jar\r
jronn.limits.file=conf/settings/JronnLimits.xml\r
\r
### AACon configuration ###\r
# This is just a path to the standard java executable \r
-local.aacon.bin.windows=D:\\Java\\jdk1.6.0_24\\bin\\java.exe \r
-local.aacon.bin=/sw/java/latest/bin/java\r
+#local.aacon.bin.windows=D:\\Java\\jdk1.6.0_24\\bin\\java.exe \r
+#local.aacon.bin=/sw/java/latest/bin/java\r
cluster.aacon.bin=/sw/java/latest/bin/java\r
# Path to the AACon library\r
aacon.jar.file=binaries/windows/aaconservation.jar\r
} else {\r
bin = ph.getProperty("local." + execCommandName + ".bin");\r
}\r
+ // For executable Jar files the location of Java executable is not\r
+ // required for local execution. If it is not provided, JABAWS will\r
+ // attempt to use Java from JAVA_HOME env variable\r
+ if (isJavaLibrary(clazz)) {\r
+ if (compbio.util.Util.isEmpty(bin)) {\r
+ bin = getJava();\r
+ }\r
+ }\r
// If path to executable defined in the properties is not absolute,\r
// then make it so\r
// as setting working directory of ProcessBuilder will make it\r
// to find an executable otherwise\r
if (!compbio.util.Util.isEmpty(bin)\r
&& !PathValidator.isAbsolutePath(bin)) {\r
- bin = PropertyHelperManager.getLocalPath() + bin;\r
+ bin = bin.trim();\r
+ if (bin.equalsIgnoreCase("java")\r
+ || bin.equalsIgnoreCase("java.exe")) {\r
+ // do not make path absolute to the java executable if\r
+ // relative path is provided. Java executable is not a part\r
+ // of JABAWS distribution!\r
+ } else {\r
+ bin = PropertyHelperManager.getLocalPath() + bin;\r
+ }\r
}\r
} else {\r
bin = ph.getProperty("cluster." + execCommandName + ".bin");\r
}\r
return bin; // File.separator\r
}\r
+ /**\r
+ * Returns true of executableName.jar.file property has some value in the\r
+ * Executable.properties file, false otherwise.\r
+ * \r
+ * @param clazz\r
+ * @return\r
+ */\r
+ public static boolean isJavaLibrary(Class<?> clazz) {\r
+ String execCommandName = clazz.getSimpleName().toLowerCase();\r
+ String java_lib = ph.getProperty(execCommandName + ".jar.file");\r
+ assert FileUtil.exist(java_lib);\r
+ return !compbio.util.Util.isEmpty(java_lib);\r
+ }\r
+\r
+ /**\r
+ * Returns the absolute path to the Java executable from JAVA_HOME\r
+ * \r
+ * @return\r
+ */\r
+ public static String getJava() {\r
+ String javahome = System.getenv("JAVA_HOME");\r
+ File jh = new File(javahome);\r
+ if (jh.exists() && jh.isDirectory()) {\r
+ String java = javahome + File.separator + "bin" + File.separator\r
+ + "java";\r
+ if (SysPrefs.isWindows) {\r
+ java += ".exe";\r
+ }\r
+ File jexe = new File(java);\r
+ if (jexe.exists() && jexe.isFile() && jexe.canExecute()) {\r
+ log.info("Using Java from: " + jexe.getAbsolutePath());\r
+ return jexe.getAbsolutePath();\r
+ } else {\r
+ log.warn("Cannot find java executable in the JAVA_HOME!");\r
+ }\r
+ } else {\r
+ log.warn("JAVA_HOME does not seems to point to a valid directory! Value: "\r
+ + javahome);\r
+ }\r
+ return null;\r
+ }\r
\r
public static ExecProvider getSupportedRuntimes(Class<?> clazz) {\r
boolean localRuntimeSupport = false;\r
if (!compbio.util.Util.isEmpty(localRuntime1)\r
|| !compbio.util.Util.isEmpty(localRuntime2)) {\r
localRuntimeSupport = true;\r
+ } else {\r
+ localRuntimeSupport = isJavaLibrary(clazz) && getJava() != null;\r
}\r
+\r
String clusterRuntime = ph.getProperty("cluster." + executableName\r
+ ".bin");\r
if (!compbio.util.Util.isEmpty(clusterRuntime)) {\r
throw new InvalidParameterException(\r
"Executable is not provided for any runtime environments");\r
}\r
-\r
public static ConfiguredExecutable<?> loadExecutable(String taskId)\r
throws ResultNotAvailableException {\r
String workDir = compbio.engine.Configurator.getWorkDirectory(taskId);\r