Example usage for com.google.gwt.dev.codeserver CodeServer start

List of usage examples for com.google.gwt.dev.codeserver CodeServer start

Introduction

In this page you can find the example usage for com.google.gwt.dev.codeserver CodeServer start.

Prototype

public static WebServer start(Options options) throws IOException, UnableToCompleteException 

Source Link

Document

Starts the code server with the given command line options.

Usage

From source file:ilarkesto.webapp.GwtSuperDevMode.java

License:Open Source License

public void startCodeServer() {
    if (webServer != null)
        throw new IllegalStateException("Already started");
    IO.delete(getWorkDir());//w w  w.j av a 2s  . c o  m

    log.info("Starting GWT Super Dev Mode CodeServer on port", port);
    Sys.setProperty("gwt.codeserver.port", String.valueOf(port));
    RuntimeTracker rt = new RuntimeTracker();
    Options options = createOptions();
    try {
        webServer = CodeServer.start(options);
    } catch (Exception ex) {
        throw new RuntimeException(ex);
    }
    log.info("CodeServer started in", rt.getRuntimeFormated());
}

From source file:org.nuxeo.webengine.gwt.codeserver.CodeServerWrapper.java

License:Apache License

@Override
public void startup(String[] args) throws Exception {
    Options options = new Options();

    if (!options.parseArgs(args)) {
        throw new RuntimeException("Cannot parse gwt code server options");
    }//from  www  .j  av  a2s  . c o m
    ClassLoader cl = Thread.currentThread().getContextClassLoader();
    Thread.currentThread().setContextClassLoader(CodeServerWrapper.class.getClassLoader());
    try {
        server = CodeServer.start(options);
    } finally {
        Thread.currentThread().setContextClassLoader(cl);
    }
}