import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.nio.SelectChannelConnector;
import org.eclipse.jetty.webapp.WebAppContext;
public class Launcher {
public static void main(String[] args) throws Exception {
Server server = new Server();
SelectChannelConnector connector = new SelectChannelConnector();
connector.setPort(8080);
server.addConnector(connector);
WebAppContext context = new WebAppContext("webapp", "/");
if (System.getProperty("os.name").toLowerCase().contains("windows")) {
// fix for Windows, so Jetty doesn't lock files
context.getInitParams().put("org.eclipse.jetty.servlet.Default.useFileMappedBuffer", "false");
}
server.setHandler(context);
server.start();
}
}