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