runjetty.java
来自「openfans 0.1 using: eclipse, maven, s」· Java 代码 · 共 44 行
JAVA
44 行
/* * Created on 2005-4-11 * * Copyright bloomsoft.cn All rights reserved */package org.openfans.bin;import java.net.URL;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import org.mortbay.jetty.Server;public class RunJetty { private static Log log = LogFactory.getLog(RunJetty.class); /** * @param args */ public static void main(String[] args) { Server jettyServer = null; try { URL jettyConfig = RunJetty.class.getResource("jetty-config.xml"); if (jettyConfig == null) { log .fatal("Unable to locate jetty-test-config.xml on the classpath"); } jettyServer = new Server(jettyConfig); jettyServer.start(); } catch (Exception e) { log.fatal("Could not start the Jetty server: " + e); if (jettyServer != null) { try { jettyServer.stop(); } catch (InterruptedException e1) { log.fatal("Unable to stop the jetty server: " + e1); } } } }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?