Jetty Eclipse连接错误:类型为Server的方法dumpStdErr()未定义

时间:2016-05-31 00:36:42

标签: eclipse jetty

我正在尝试使用此link在eclipse中为 Jetty服务器编写一个helloWorld。但是,我无法弄清楚哪个库包含“dumpStdErr()”,因为我的编译器未定义它。这个功能还有其他选择吗?

import org.eclipse.jetty.server.Server; 

/*
* The simplest possible Jetty server.
*/ 
    public class SimplestServer { public static void main( String[] args ) throws Exception {
    Server server = new Server(8080);
    server.start();
    server.dumpStdErr();
    server.join(); } }

1 个答案:

答案 0 :(得分:1)

您没有在依赖项中使用最新/稳定版本的Jetty。

请参阅:http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/server/Server.html

Warning: not found: compass Use --force to continue. Aborted due to warnings. 方法was added in Jetty 7.3.0并且自那以后一直存在于每个版本中。

  

注意:Jetty 7 and Jetty 8 are EOL (End of Life),不要再使用它们了。第一次有机会升级到Jetty 9。