Zobrazují se příspěvky se štítkemOSGI. Zobrazit všechny příspěvky
Zobrazují se příspěvky se štítkemOSGI. Zobrazit všechny příspěvky

sobota 25. ledna 2014

Installing and starting bundles in OSGI on windows

In most tutorials, you can find that similar to the following command for installing new bundles should work:

osgi>install file:c:\temp\bundles\plugins\org.eclipse.equinox.ds.jar

But when I tried this, I encountered the error: gogo: BundleException: An error occurred trying to read the bundle

So in such case, the following change helped me:
osgi>install file:c:///Temp//bundles//plugins//org.eclipse.equinox.ds.jar

Original command will work on Linux system.

pátek 24. ledna 2014

Running OSGI console

Necessary plugins to run console for org.eclipse.osgi_<version>.jar:

Since equinox 3.8, following bundles are needed to be loaded for running osgi console:

  • org.apache.felix.gogo.command_0.8.0v<version>.jar
  • org.apache.felix.gogo.runtime_0.8.0v<version>.jar
  • org.apache.felix.gogo.shell_0.8.0v<version>.jar
  • org.eclipse.equinox.console_1.0.0v<version>.jar

It is enough to use configuration file for OSGI:

  • copy files mentioned above from your eclipse installation/plugins folder to the folder with osgi bundle
  • create file "configuration\config.ini" in the folder where the osgi JAR file is placed
  • insert following context to the file (replace file names with the real names or rename jar files):
osgi.bundles=org.eclipse.equinox.console.jar@start,org.apache.felix.gogo.command.jar@start,org.apache.felix.gogo.runtime.jar@start,org.apache.felix.gogo.shell.jar@start
Now you can test the OSGI console with:

  •  java -jar org.eclipse.osgi_<version>.jar -console

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