O'Reilly logo

Mastering Eclipse Plug-in Development by Dr. Alex Blewitt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reloading native libraries

When a native library is loaded into the JVM, it can only be loaded from a single bundle at a time. If the bundle is restarted or updated, the existing native library is reused for the new version of the bundle. The reason for this is that the JVM ensures that the fully qualified path of the native library is associated with a single ClassLoader instance. Subsequent loads of the native library will fail.

If the bundle is uninstalled completely, the native library may be subject to unloading. Note that this only occurs when the ClassLoader instance associated with the bundle is garbage collected, which may be some time after the bundle has been stopped.

Note that as discussed earlier in this chapter, the OSGi specification ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required