Package uk.ac.cam.ch.wwmm.ptclib.io

Examples of uk.ac.cam.ch.wwmm.ptclib.io.ResourceGetter.writeToFile()


  public static void deployInChI() throws Exception {
    ResourceGetter rg = new ResourceGetter("uk/ac/cam/ch/wwmm/oscar3/deployment/resources/");
    File inchiFile = null;
    if(System.getProperty("os.name").equals("Linux")) {
      inchiFile = new File("cInChI-1");
      rg.writeToFile("cInChI-1.bin", inchiFile);
      Runtime.getRuntime().exec("chmod a+x " + inchiFile.getAbsolutePath());
    } else if(System.getProperty("os.name").startsWith("Windows")) {
      inchiFile = new File("cInChI-1.exe");
      rg.writeToFile("cInChI-1.exe", inchiFile);
    }
View Full Code Here


      inchiFile = new File("cInChI-1");
      rg.writeToFile("cInChI-1.bin", inchiFile);
      Runtime.getRuntime().exec("chmod a+x " + inchiFile.getAbsolutePath());
    } else if(System.getProperty("os.name").startsWith("Windows")) {
      inchiFile = new File("cInChI-1.exe");
      rg.writeToFile("cInChI-1.exe", inchiFile);
    }
    if(inchiFile != null) {
      Oscar3Props.setProperty("InChI", inchiFile.getAbsolutePath());
    } else {
      Oscar3Props.setProperty("InChI", "none");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.