简体   繁体   中英

Cannot start osgi container (equinox) within eclipse

I've installed Eclipse Juno Service Release 2. I'm trying to learn OSGi using the Equinox container within eclipse. However, when I try to start Equinox from the command prompt using the following code, it does not start. Can someone please let me know what is missing here?

java -jar org.eclipse.osgi_3.8.2.v20130124-134944.jar -console

Thanks!

I faced the same issue while moving from 3.5 to 3.8.2 . They changed the implementation of console which now relies on felix gogo project . You will need to start the following bundles along with standard equinox :

  1. org.eclipse.equinox.console_1.0.100.v20121001-124408.jar
  2. org.apache.felix.gogo.shell_0.10.0.v201211091412.jar
  3. org.apache.felix.gogo.runtime_0.10.0.v201209301036.jar
  4. org.apache.felix.gogo.command_0.10.0.v201209301215.jar

You can add them to the list of bundles to start by default in the config.ini file as follows :

#contents of config.ini
osgi.bundles=org.eclipse.equinox.console_1.0.100.v20121001-124408.jar@start,org.apache.felix.gogo.shell_0.10.0.v201211091412.jar@start,org.apache.felix.gogo.runtime_0.10.0.v201209301036.jar@start,org.apache.felix.gogo.command_0.10.0.v201209301215.jar@start

Your directory structure should be

- org.eclipse.osgi_3.8.2.v20130124-134944.jar
- configuration/
             config.ini

Yep, I see the same behavior. After reading some of the beginner tutorial (yes I'm a beginner :-) at OSGi with Equinox for beginners: console, launcher and configuration I discovered that logs are sent to log files by default and to see them in stdout you need the -consoleLog paramter

java -jar org.eclipse.osgi_3.8.2.v20130124-134944.jar -console -consoleLog

Which then tells me the message

org.osgi.framework.BundleException: Could not find bundle: org.eclipse.equinox.console

I googled that which led me to here: org.osgi.framework.BundleException: Could not find bundle: org.eclipse.equinox.console . I didn't try it but it looks like the solution you need.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM