Better method for searching JAVA
authorpvtroshin <pvtroshin@e3abac25-378b-4346-85de-24260fe3988d>
Wed, 6 Jul 2011 10:56:04 +0000 (10:56 +0000)
committerpvtroshin <pvtroshin@e3abac25-378b-4346-85de-24260fe3988d>
Wed, 6 Jul 2011 10:56:04 +0000 (10:56 +0000)
git-svn-id: link to svn.lifesci.dundee.ac.uk/svn/barton/ptroshin/JABA2@4392 e3abac25-378b-4346-85de-24260fe3988d

IDEAS.txt
TODO.txt
conf/Executable.properties
engine/compbio/engine/client/Util.java

index 3be0c19..ba3b9eb 100644 (file)
--- a/IDEAS.txt
+++ b/IDEAS.txt
@@ -1,5 +1,19 @@
 FUTURE TODO\r
 \r
 FUTURE TODO\r
 \r
+Pack the test cases and build file to run them in one of the distributives \r
+\r
+? Better native Mac support (and maybe abandon native windows support in \r
+favour of VM)\r
+\r
+Cluster stats: \r
+ -Remove hyperlinks from tasks which workdirs were removed \r
+ Way to do: Crawler is to update DB records if the directory is not found to prevent link \r
+generation for stats. \r
+ -graph generation \r
+ -user documentation (do not forget how to enable follow symlinks!)\r
+   \r
+Webpage for testing web services?\r
+\r
 Add interface for Jalview annotation \r
 \r
 Develop generic Interface to return Jalview annotation for easy to add new \r
 Add interface for Jalview annotation \r
 \r
 Develop generic Interface to return Jalview annotation for easy to add new \r
index d502d48..ef4c64c 100644 (file)
--- a/TODO.txt
+++ b/TODO.txt
@@ -1,71 +1,62 @@
-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
 \r
+Write help on \r
+ - execution stats\r
+ - new VM \r
+ - new properties e.g. jar\r
+ - registry\r
+ - merge developers help pages\r
+ - new menu bar background & page background(?)\r
+ - change log \r
+ - main page should point to JABA 1   \r
+ - Document the Limits for presets\r
+ - JAVA DOCS\r
+ - defaults changed - e.g. limits are disabled - explain how to enable\r
+ - cluster settings are commented out \r
+ - Describe requirements \r
 Python > 2.2\r
 Perl > 5.0\r
 Java > 6\r
 Python > 2.2\r
 Perl > 5.0\r
 Java > 6\r
-\r
 For compilation \r
 C++\r
 C\r
 Gnu make\r
 For compilation \r
 C++\r
 C\r
 Gnu make\r
+   \r
+- Check progress tracking on large sequence.\r
 \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
+- Add more detailed tests for webservices? \r
 \r
 \r
-Add more detailed tests for webservices? \r
-\r
-? ideally should introduce native Mac support (and maybe abandon native windows support in \r
-favour of VM)   \r
-\r
-TODO write some help on the executable.properties within this file! \r
+- TODO write some help on the executable.properties within this file! \r
 check that after binaries relocation build tasks point to correct locations!\r
 \r
 check that after binaries relocation build tasks point to correct locations!\r
 \r
-Cluster stats: \r
- -Remove hyperlinks from tasks which workdirs were removed \r
- -graph generation \r
- -user documentation (do not forget how to enable follow symlinks!)\r
 \r
 add to help text: To disable a web service remove it from WEB-INF/sun-jaxws.xml descriptor\r
 \r
 rename jaba.war to jabaws.war and make sure jabaws context path is used throughout. \r
 \r
 \r
 add to help text: To disable a web service remove it from WEB-INF/sun-jaxws.xml descriptor\r
 \r
 rename jaba.war to jabaws.war and make sure jabaws context path is used throughout. \r
 \r
-+ Current stat collector has to rely on file dates! \r
-\r
 \r
 ? Replace conservation.Method with server.ws.Method and try building WS. If this does not work - get rid of Method\r
 \r
 integrate the above to tweak the size of the local job\r
 \r
 \r
 ? Replace conservation.Method with server.ws.Method and try building WS. If this does not work - get rid of Method\r
 \r
 integrate the above to tweak the size of the local job\r
 \r
-+ Good toString method for Limits (test with command line client -limits)\r
-Document the Limits for presets\r
-JABA DOCS\r
 \r
 (later) Add documentation on Presets, Parameters and Limits\r
 (later) Explain how to define a limit\r
 \r
 Add test for repeated result collection from cluster engine\r
 \r
 \r
 (later) Add documentation on Presets, Parameters and Limits\r
 (later) Explain how to define a limit\r
 \r
 Add test for repeated result collection from cluster engine\r
 \r
-(low) Pack the test cases and build file to run them in one of the distributives \r
 \r
 \r
 DONE\r
 \r
 version 2\r
 \r
 \r
 \r
 DONE\r
 \r
 version 2\r
 \r
+DONE: Current stat collector has to rely on file dates! \r
+DONE: Help information? - relative - client to add host and context info\r
+DONE: statistics - result files \r
+DONE: Good toString method for Limits (test with command line client -limits)\r
+DONE: install JABA 1 stat server \r
+DONE: Get path to Java executable from JAVA_HOME ? (for Jronn AACon) \r
+\r
 DONE:  GET rid of binaries/help directory!\r
 DONE:  update binaries\r
  DONE:  muscle binary version 3.8.31 for win/lin32/lin64 and sources, docs in website/prog_docs\r
 DONE:  GET rid of binaries/help directory!\r
 DONE:  update binaries\r
  DONE:  muscle binary version 3.8.31 for win/lin32/lin64 and sources, docs in website/prog_docs\r
index a1107ca..5bd5b6e 100644 (file)
@@ -20,7 +20,7 @@
 ### Clustal configuration ###\r
 local.clustalw.bin.windows=binaries/windows/clustalw2.exe\r
 local.clustalw.bin=binaries/src/clustalw/src/clustalw2\r
 ### Clustal configuration ###\r
 local.clustalw.bin.windows=binaries/windows/clustalw2.exe\r
 local.clustalw.bin=binaries/src/clustalw/src/clustalw2\r
-cluster.clustalw.bin=/homes/pvtroshin/workspace/jaba2/binaries/src/clustalw/src/clustalw2\r
+#cluster.clustalw.bin=/homes/pvtroshin/workspace/jaba2/binaries/src/clustalw/src/clustalw2\r
 # Parameters names which come from RunnerConfig -> Parameters.xml file ultimately are all lowercased in comparison!\r
 # see engine.client.Util.getExecProperty() method for details  \r
 # So they are case insensitive. \r
 # Parameters names which come from RunnerConfig -> Parameters.xml file ultimately are all lowercased in comparison!\r
 # see engine.client.Util.getExecProperty() method for details  \r
 # So they are case insensitive. \r
@@ -33,7 +33,7 @@ clustalw.parameters.file=conf/settings/ClustalParameters.xml
 ### Muscle configuration ###\r
 local.muscle.bin.windows=binaries/windows/muscle.exe\r
 local.muscle.bin=binaries/src/muscle/muscle\r
 ### Muscle configuration ###\r
 local.muscle.bin.windows=binaries/windows/muscle.exe\r
 local.muscle.bin=binaries/src/muscle/muscle\r
-cluster.muscle.bin=/homes/pvtroshin/workspace/jaba2/binaries/src/muscle/muscle\r
+#cluster.muscle.bin=/homes/pvtroshin/workspace/jaba2/binaries/src/muscle/muscle\r
 #The environment variable MUSCLE_MXPATH can be used to specify a path where the matrices are stored\r
 # e.g. MUSCLE_MXPATH#binaries/matrices - but need to privide absolute path!\r
 muscle.-matrix.path=binaries/matrices\r
 #The environment variable MUSCLE_MXPATH can be used to specify a path where the matrices are stored\r
 # e.g. MUSCLE_MXPATH#binaries/matrices - but need to privide absolute path!\r
 muscle.-matrix.path=binaries/matrices\r
@@ -44,7 +44,7 @@ muscle.parameters.file=conf/settings/MuscleParameters.xml
 \r
 ### Mafft configuration ###\r
 local.mafft.bin=binaries/src/mafft/scripts/mafft\r
 \r
 ### Mafft configuration ###\r
 local.mafft.bin=binaries/src/mafft/scripts/mafft\r
-cluster.mafft.bin=/homes/pvtroshin/workspace/jaba2/binaries/src/mafft/scripts/mafft\r
+#cluster.mafft.bin=/homes/pvtroshin/workspace/jaba2/binaries/src/mafft/scripts/mafft\r
 # These paths will be converted to absolute if relative.\r
 mafft.bin.env=MAFFT_BINARIES#binaries/src/mafft/binaries;FASTA_4_MAFFT#binaries/src/fasta34/fasta34;\r
 mafft.--aamatrix.path=binaries/matrices\r
 # These paths will be converted to absolute if relative.\r
 mafft.bin.env=MAFFT_BINARIES#binaries/src/mafft/binaries;FASTA_4_MAFFT#binaries/src/fasta34/fasta34;\r
 mafft.--aamatrix.path=binaries/matrices\r
@@ -56,7 +56,7 @@ mafft.parameters.file=conf/settings/MafftParameters.xml
 \r
 ### Tcoffee configuration ###\r
 local.tcoffee.bin=binaries/src/tcoffee/t_coffee_source/t_coffee\r
 \r
 ### Tcoffee configuration ###\r
 local.tcoffee.bin=binaries/src/tcoffee/t_coffee_source/t_coffee\r
-cluster.tcoffee.bin=/homes/pvtroshin/workspace/jaba2/binaries/src/tcoffee/t_coffee_source/t_coffee\r
+#cluster.tcoffee.bin=/homes/pvtroshin/workspace/jaba2/binaries/src/tcoffee/t_coffee_source/t_coffee\r
 # This variable is required by tcoffee\r
 tcoffee.bin.env=HOME_4_TCOFFEE#jobsout;\r
 tcoffee.presets.file=conf/settings/TcoffeePresets.xml\r
 # This variable is required by tcoffee\r
 tcoffee.bin.env=HOME_4_TCOFFEE#jobsout;\r
 tcoffee.presets.file=conf/settings/TcoffeePresets.xml\r
@@ -67,7 +67,7 @@ tcoffee.parameters.file=conf/settings/TcoffeeParameters.xml
 \r
 ### Probcons configuration ###\r
 local.probcons.bin=binaries/src/probcons/probcons\r
 \r
 ### Probcons configuration ###\r
 local.probcons.bin=binaries/src/probcons/probcons\r
-cluster.probcons.bin=/homes/pvtroshin/workspace/jaba2/binaries/src/probcons/probcons\r
+#cluster.probcons.bin=/homes/pvtroshin/workspace/jaba2/binaries/src/probcons/probcons\r
 #Probcons does not support matrix loading - unrecognised option reported! \r
 probcons.parameters.file=conf/settings/ProbconsParameters.xml\r
 #probcons.limits.file=conf/settings/ProbconsLimits.xml\r
 #Probcons does not support matrix loading - unrecognised option reported! \r
 probcons.parameters.file=conf/settings/ProbconsParameters.xml\r
 #probcons.limits.file=conf/settings/ProbconsLimits.xml\r
@@ -78,7 +78,7 @@ probcons.parameters.file=conf/settings/ProbconsParameters.xml
 # 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
 # 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
+#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
 #jronn.cluster.cpunum=4\r
 jronn.jar.file=binaries/windows/jronn3.1.jar\r
 jronn.limits.file=conf/settings/JronnLimits.xml\r
 #jronn.cluster.cpunum=4\r
@@ -87,13 +87,13 @@ jronn.limits.file=conf/settings/JronnLimits.xml
 \r
 ### Disembl configuration Tisean - Disembl dependancy ### \r
 local.disembl.bin=binaries/src/disembl/DisEMBL.py\r
 \r
 ### Disembl configuration Tisean - Disembl dependancy ### \r
 local.disembl.bin=binaries/src/disembl/DisEMBL.py\r
-cluster.disembl.bin=/homes/pvtroshin/workspace/jaba2/binaries/src/disembl/DisEMBL.py\r
+#cluster.disembl.bin=/homes/pvtroshin/workspace/jaba2/binaries/src/disembl/DisEMBL.py\r
 #disembl.limits.file=conf/settings/DisemblLimits.xml\r
 #disembl.cluster.settings=-l h_cpu=24:00:00 -l h_vmem=6000M -l ram=6000M\r
 \r
 ### GlobPlot configuration Tisean - GlobPlot and Disembl dependancy ### \r
 local.globplot.bin=binaries/src/globplot/GlobPlot.py\r
 #disembl.limits.file=conf/settings/DisemblLimits.xml\r
 #disembl.cluster.settings=-l h_cpu=24:00:00 -l h_vmem=6000M -l ram=6000M\r
 \r
 ### GlobPlot configuration Tisean - GlobPlot and Disembl dependancy ### \r
 local.globplot.bin=binaries/src/globplot/GlobPlot.py\r
-cluster.globplot.bin=/homes/pvtroshin/workspace/jaba2/binaries/src/globplot/GlobPlot.py\r
+#cluster.globplot.bin=/homes/pvtroshin/workspace/jaba2/binaries/src/globplot/GlobPlot.py\r
 #globplot.bin.env=PYTHONPATH#/homes/pvtroshin/workspace/jaba2/binaries/src/globplot/biopython-1.50 \r
 globplot.limits.file=conf/settings/GlobPlotLimits.xml\r
 #globplot.cluster.settings=-l h_cpu=24:00:00 -l h_vmem=6000M -l ram=6000M\r
 #globplot.bin.env=PYTHONPATH#/homes/pvtroshin/workspace/jaba2/binaries/src/globplot/biopython-1.50 \r
 globplot.limits.file=conf/settings/GlobPlotLimits.xml\r
 #globplot.cluster.settings=-l h_cpu=24:00:00 -l h_vmem=6000M -l ram=6000M\r
@@ -105,7 +105,7 @@ local.iupred.bin=binaries/src/iupred/iupred
 #iupred.bin.env=IUPred_PATH#/homes/pvtroshin/workspace/jaba2/binaries/src/iupred\r
 # This path will be converted to absolute if relative. \r
 iupred.bin.env=IUPred_PATH#binaries/src/iupred\r
 #iupred.bin.env=IUPred_PATH#/homes/pvtroshin/workspace/jaba2/binaries/src/iupred\r
 # This path will be converted to absolute if relative. \r
 iupred.bin.env=IUPred_PATH#binaries/src/iupred\r
-cluster.iupred.bin=/homes/pvtroshin/workspace/jaba2/binaries/src/iupred/iupred\r
+#cluster.iupred.bin=/homes/pvtroshin/workspace/jaba2/binaries/src/iupred/iupred\r
 iupred.parameters.file=conf/settings/IUPredParameters.xml\r
 #iupred.limits.file=conf/settings/IUPredLimits.xml\r
 #iupred.cluster.settings=-l h_cpu=24:00:00 -l h_vmem=6000M -l ram=6000M\r
 iupred.parameters.file=conf/settings/IUPredParameters.xml\r
 #iupred.limits.file=conf/settings/IUPredLimits.xml\r
 #iupred.cluster.settings=-l h_cpu=24:00:00 -l h_vmem=6000M -l ram=6000M\r
@@ -114,7 +114,7 @@ iupred.parameters.file=conf/settings/IUPredParameters.xml
 # 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
 # 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
-cluster.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
 aacon.parameters.file=conf/settings/AAConParameters.xml\r
 # Path to the AACon library\r
 aacon.jar.file=binaries/windows/aaconservation.jar\r
 aacon.parameters.file=conf/settings/AAConParameters.xml\r
index 66f3a35..634112f 100644 (file)
@@ -253,6 +253,7 @@ public final class Util {
                } else {\r
                        bin = ph.getProperty("cluster." + execCommandName + ".bin");\r
                }\r
                } else {\r
                        bin = ph.getProperty("cluster." + execCommandName + ".bin");\r
                }\r
+               log.debug("Using executable: " + bin);\r
                return bin; // File.separator\r
        }\r
        /**\r
                return bin; // File.separator\r
        }\r
        /**\r
@@ -274,7 +275,15 @@ public final class Util {
         * @return\r
         */\r
        public static String getJava() {\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
                File jh = new File(javahome);\r
                if (jh.exists() && jh.isDirectory()) {\r
                        String java = javahome + File.separator + "bin" + File.separator\r