📄 runjetty.java
字号:
/* * 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -