I'm trying to get the osgi server from the Eclipse Juno Release and run it standalone. Some old tutorials say that just grabbing the org.eclipse.osgi_VERSION.jar
is enough to start it from the command line as
java -jar org.eclipse.osgi_VERSION.jar -console
When I try that, it doesn't show the prompt as expected, but instead sits quietly as if waiting for something to happen.
However, I can comfortably start and install bundles by doing a ./eclipse -console
, which obviously isn't an option when running on the server, where I want to deploy bundles at runtime.
Some googling revealed I need to gather up jars (even Apache Felix's gogo) from here and there, but couldn't find anything concrete that would allow me to run this thing in a "headless" fashion.
Is there a way to do this in a clean and simple way, or would you suggest shifting to Apache Felix?
The OSGi (Open Service Gateway Initiative) specification is a Java framework for developing and deploying modular software programs and libraries. The framework was originally managed by the OSGi Alliance, an open standards organization.
In computing, Equinox is a sub-project of the Eclipse project that provides a certified implementation of the OSGi R4. x core framework specification. It is a module runtime that allows developers to implement an application as a set of "bundles" using the common services infrastructure.
Bundle Pooling is, simply put, a mechanism that allows multiple Eclipse applications to share a common set of plug-ins (bundles).
Equinox in Juno does no longer contain the console out of the box. It's now contained in a separate bundle which implements the Equinox console on top of the Apache GoGo shell.
Thus, the minimum setup of bundles for running Equinox including the console is:
For running the SSH console one also needs:
Additionally, you need to use a different configuration area. Equinox reads settings (like what bundles to use, their start levels, what application to start, etc.) from the config.ini. Thus, as along as you use the same configuration area as Juno you'll always end up in your Juno environment. You may corrupt your Juno installation when modifying the config.ini directly.
A better start is to download the Equinox Juno OSGi starter kit:
You can also try one of the OSGi Equinox server distributions:
You should try Apache karaf. It can run with Felix or Equinox and contains everything you need for a decent OSGi server. See http://karaf.apache.org/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With