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

Violette Roche-Montane
06.25.2014 a5eaf037b1285bbc48c06c932de5696234cb51f7
opendj-sdk/opendj-cli/src/main/java/com/forgerock/opendj/cli/Utils.java
@@ -332,6 +332,20 @@
        return buffer.toString();
    }
    /**
     * Checks that the java version.
     *
     * @throws CLIException
     *             If the java version we are running on is not compatible.
     */
    public static void checkJavaVersion() throws CLIException {
        final String version = System.getProperty("java.specification.version");
        if (!(Float.valueOf(version) >= 1.6)) {
            final String javaBin = System.getProperty("java.home") + File.separator + "bin" + File.separator + "java";
            throw new CLIException(ERR_INCOMPATIBLE_JAVA_VERSION.get("1.6", version, javaBin), null);
        }
    }
    // Prevent instantiation.
    private Utils() {
        // Do nothing.