简体   繁体   中英

cannot run osgi bundles outside eclipse

I am making my firsts steps using osgi and I have a problem with a bundle I created.

I developed 3 bundles in eclipse (they are plugin projects). When I run my bundles inside eclipse using a new and empty target, they work very nice.

Then I tried to export them and run them without eclipse I ran with problems. I created a jar file for each one of them (using export ->deployable plugin) and then I install them in a running equinox container (v3.7.1, from eclipse's plugin directory) and I got a lot of ClassNotFoundExceptions for RuntimeErrorException

this looks like a classpath issue. I think I am not exporting the bundle correctly, but I am not sure.

The problem only happens with 2 of the bundles, which use additional libraries

how can I do it correctly?

In case you need it, this is the full stack

Taking one of the exceptions for example: NoClassDefFoundError on javax.management.RuntimeErrorException .

Did you import the package javax.management in your bundle?

See the following page from the OSGi Community Wiki, it seems directly relevant to your problem: http://wiki.osgi.org/wiki/Why_does_Eclipse_find_javax.swing_but_not_Felix%3F

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