I am doing this tutorial to learn OSGi. It creates a single JAX-RS Whiteboard service that serves a simple web page on port 8080. On my machine, it can’t start because port 8080 is already in use. How can I set it to use a different port? I have been unable to find even the slightest mention of ports in this context, except in section 140.11 of the OSGi Whiteboard specification, and that also seems to just say what the framework should default to if the user does not specify a port through “some other means”.
going by that tutorial, you want to put this in your app.bndrun file
-runproperties: org.osgi.service.http.port=8081
save yourself some trouble, use a widely used osgi runtime like apache felix or apache karaf. also checkout apache sling.