Accessing the OSGi Console
How to Access the OSGi Console in CIShell Tools
When developing in a CIShell environment, it is often useful to have command-line access to the OSGi console. CIShell sometimes prints messages to the OSGi console which can be helpful in diagnosing problems. If you are writing your own algorithms, you can print to the console using the Java System.out.println or System.err.println methods. The OSGi console also lets you inspect the OSGi environment behind CIShell, which may also be useful for diagnostic or educational purposes.
To make the OSGi console visible, you will need to start your CIShell tool using the "-console" command-line switch. From a command-line prompt in Windows, OS X, or Linux, you can simply start the CIShell executable with the extra argument, like "cishell -console".
(Another useful command-line switch is "-clean", which should be run whenever plugins have been replaced in a CIShell tool. This switch forces OSGi to refresh its cache of information about plugins, which can prevent errors where cached information from older plugins is associated with the newer plugins)
In Windows, you can start a CIShell tool using command-line switches through the standard graphical interface, by following these steps:
1) Create a shortcut to the CIShell executable. This can be done by right-clicking the executable icon, and clicking "Create Shortcut".
2) Right-click on the shortcut we just created, and click "Properties".
3) In the properties dialog that appears, append " -console" on to the end of the path in the "Target:" text field.
4) Double-click the shortcut to start the CIShell tool using the -console command-line argument.
If the operation was successful, a separate command-line window should appear in addition to the normal CIShell tool interface.
A guide to using the OSGi console can be found here. Detailed information about the various commands available through the OSGi console can be found in the OSGi specification.