Reputation: 2075
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?
Upvotes: 5
Views: 4139
Reputation: 24060
To run with the old console, you can invoke:
java -Dosgi.console.enable.builtin=true -jar org.eclipse.osgi_VERSION.jar -console
Note that this is using the old (non-Gogo implementation) and the built-in console is likely to be removed at some point. However, you should consider running with the Gogo shell instead, which is the de-facto standard for future Eclipse and Felix versions.
Upvotes: 0
Reputation: 3479
This link provides all the details regarding the new console which is based on Apache Felix Gogo shell: http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fconsole_shell.htm
In short steps are:
Place the necessary bundles in a folder. The bundles are: org.apache.felix.gogo.command_0.8.0v.jar org.apache.felix.gogo.runtime_0.8.0v.jar org.apache.felix.gogo.shell_0.8.0v.jar org.eclipse.equinox.console_1.0.0v.jar org.eclipse.osgi.jar
Create a configuration subfolder and a config.ini file with the following content
osgi.bundles=./org.apache.felix.gogo.runtime_0.8.0v.jar@start,\ ./org.apache.felix.gogo.command_0.8.0v.jar@start,\ ./org.apache.felix.gogo.shell_0.8.0v.jar@start,\ ./org.eclipse.equinox.console.jar@start,\ osgi.console.enable.builtin=false
Start the Equinox framework with the below command: java -jar org.eclipse.osgi.jar
Upvotes: 0
Reputation: 19626
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/
Upvotes: 1
Reputation: 2359
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:
Upvotes: 12
Reputation: 56
Try this:
java -classpath ./plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
org.eclipse.equinox.launcher.Main -console
Upvotes: 1