} else {\r
bin = ph.getProperty("cluster." + execCommandName + ".bin");\r
}\r
+ log.debug("Using executable: " + bin);\r
return bin; // File.separator\r
}\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
* @return\r
*/\r
public static String getJava() {\r
- String javahome = System.getenv("JAVA_HOME");\r
+ String javahome = System.getProperty("java.home");\r
+ if (compbio.util.Util.isEmpty(javahome)) {\r
+ javahome = System.getenv("JAVA_HOME");\r
+ }\r
+ if (compbio.util.Util.isEmpty(javahome)) {\r
+ log.warn("Cannot find Java in java.home system property "\r
+ + "or JAVA_HOME environment variable! ");\r
+ return null;\r
+ }\r
File jh = new File(javahome);\r
if (jh.exists() && jh.isDirectory()) {\r
String java = javahome + File.separator + "bin" + File.separator\r