Package org.jtestserver.client.utils

Examples of org.jtestserver.client.utils.CommandLineBuilder


     * {@inheritDoc}
     * The implementation is launching {@code kvm} through a command line. 
     */
    @Override
    public boolean start(KVMConfig config) throws IOException {
        CommandLineBuilder cmdLine = createStartCommandLine(config);
        config.setVmName(cmdLine.toString());
        return runner.execute(cmdLine);
    }
View Full Code Here


       
        return success;
    }
   
    private CommandLineBuilder createStartCommandLine(KVMConfig config) {
        CommandLineBuilder cmdLine = new CommandLineBuilder(KVM_COMMAND);
        cmdLine.append("-m").append(config.getMemory());
        cmdLine.append(OPTION_CDROM).append(config.getCdrom().getAbsolutePath());
        cmdLine.append(config.getOptions());
        cmdLine.append("-serial").append(config.getSerial());
        cmdLine.append("-k").append(config.getKeyboard());
        return cmdLine;
    }
View Full Code Here

     */
    @Override
    public boolean start(JVMConfig config) throws IOException {       
        //runner.setWorkDir(new File(classesDir));
       
        CommandLineBuilder cmdLine = createStartCommandLine(config);
        config.setVmName(cmdLine.toString());
        return runner.execute(cmdLine);
    }
View Full Code Here

        return success;
    }
   
    private CommandLineBuilder createStartCommandLine(JVMConfig config) {
        String java = new File(config.getJavaHome(), "bin/" + JAVA_COMMAND).getAbsolutePath();
        CommandLineBuilder cmdLine = new CommandLineBuilder(java);
       
        if (config.getBootClasspath() != null) {
            cmdLine.append("-Xbootclasspath").append(config.getBootClasspath());
        }

        if (config.getOptions() != null) {
            cmdLine.append(config.getOptions());
        }
       
        cmdLine.append("-D" + ConfigurationUtils.LOGGING_CONFIG_FILE + '='
                + ConfigurationUtils.getLoggingConfigFile());

        cmdLine.append("-cp").append(config.getClasspath());
        cmdLine.append(config.getMainClass());

        return cmdLine;
    }
View Full Code Here

TOP

Related Classes of org.jtestserver.client.utils.CommandLineBuilder

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.