I am trying to embed a Jetty server in an application and am seeing a really strange problem:
According to documentation, a simple server (which I am building as a test) can be started up using the following code:
import org.eclipse.jetty.server.Server;
public class SimpleServer throws Exception
{
public static void main(String[] args)
{
Server server = new Server(8080);
server.start();
server.join();
}
}
I believe I have the correct Jar file from the downloaded Jetty:
jetty-server-9.3.7.v20160115.jar
Unfortunately, I am seeing that the Server class I am using has no public start() method. It has a protected start() method that has a LifeCycle parameter, but that is it. The public start() method referenced in the documentation (and in several answers here in Stack Overflow) does not exist!
Am I using the right Server class? If not, where do I get a proper one???
Someone please advise...