mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
15.14.2015 82d394e493e7a22528477b2aa47467140a0d5929
opendj-server-legacy/src/main/java/org/opends/server/tools/ConfigureWindowsService.java
@@ -47,7 +47,11 @@
import org.opends.server.util.DynamicConstants;
import org.opends.server.util.SetupUtils;
import com.forgerock.opendj.cli.*;
import com.forgerock.opendj.cli.ArgumentException;
import com.forgerock.opendj.cli.ArgumentParser;
import com.forgerock.opendj.cli.BooleanArgument;
import com.forgerock.opendj.cli.CommonArguments;
import com.forgerock.opendj.cli.StringArgument;
/**
  * This class is used to configure the Windows service for this instance on
@@ -272,11 +276,11 @@
   */
  static String getServiceName()
  {
    String serviceName = null;
    String serverRoot = getServerRoot();
    String[] cmd = { getBinaryFullPath(), "state", serverRoot };
    try
    {
      String serviceName = null;
      Process p = Runtime.getRuntime().exec(cmd);
      BufferedReader stdout = new BufferedReader(new InputStreamReader(p.getInputStream()));
      boolean processDone = false;
@@ -300,13 +304,12 @@
          }
        }
      }
      return serviceName;
    }
    catch (Throwable t)
    {
      serviceName = null;
      return null;
    }
    return serviceName;
  }
  /**