Package com.alphacsp.cit.exec

Examples of com.alphacsp.cit.exec.JavaLauncher


    public void validate(EnvironmentVariableContext environmentVariableContext) throws ValidationException {
        VariableValue varValue = environmentVariableContext.getVariableValue();
        String varName = environmentVariableContext.getVariableName();

        String output;
        ProcessLauncher processLauncher = new JavaLauncher(varValue.getAsFile());
        Map<String, String> environmentVariables = environmentVariableContext.getEnvironment().getVars(RenderHint.native_os);
        processLauncher.addEnvironmentVariables(environmentVariables);
        processLauncher.addCommand("-version");
        Process process = processLauncher.exec();
        output = ProcessUtils.readOutput(process);

        if (output == null) {
            throw new ValidationException("can not validate " + varName + ", java process returned no output!");
        }
View Full Code Here

TOP

Related Classes of com.alphacsp.cit.exec.JavaLauncher

Copyright © 2018 www.massapicom. 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.