// create Component (as ever for Restlet)
final Component comp = new Component();
final Server server = comp.getServers().add(Protocol.HTTP, 80);
// create JAX-RS runtime environment
final JaxRsApplication application = new JaxRsApplication(comp
.getContext().createChildContext());
// attach ApplicationConfig
application.add(new ExampleApplication());
// Attach the application to the component and start it
comp.getDefaultHost().attach(application);
comp.start();