Reputation: 2626
I downloaded jetty from http://download.eclipse.org/jetty/stable-9/dist/.
I can start/stop Jetty server. Also I know about tutorials on eclipse wiki. But I cannot find info how to add jetty to project on Java SE in eclipse.
Simply: org.eclipse.jetty.server.Server is not recognized.
Upvotes: 0
Views: 1510
Reputation: 506
If you want to embed Jetty you will need the to add the Jar file to your Build Path in Eclipse.
Jetty: http://download.eclipse.org/jetty/stable-9/dist/
The jars are located in the lib folder and you probably need the Jetty-server.jar file.
How to add a Jar to Build Path in Eclipse: Where to put the external jars?
Upvotes: 1
Reputation: 171
I assume you have your plugin sorted and it's now a compiler issue in your project. Check your build path for the project to see if you have the jetty jar included there.
Upvotes: 1
Reputation: 272217
I think this may be of interest
The following code from SimplestServer.java instantiates and runs the simplest possible Jetty server:
public class SimplestServer
{
public static void main(String[] args) throws Exception
{
Server server = new Server(8080);
server.start();
server.join();
}
}
Upvotes: 0