# Kotlin runtime and OSGi

**URL:** <https://discuss.kotlinlang.org/t/kotlin-runtime-and-osgi/362>\
**Category:** Uncategorized\
**Created:** [November 11, 2014, 10:33pm UTC](https://discuss.kotlinlang.org/t/kotlin-runtime-and-osgi/362 "2014-11-11T22:33:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pdolezal](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@pdolezal](https://discuss.kotlinlang.org/u/pdolezal)\
**Post date:** [November 11, 2014, 10:33pm UTC](https://discuss.kotlinlang.org/t/kotlin-runtime-and-osgi/362/1 "2014-11-11T22:33:18Z")

</div>

I'm curious if there are any plans about OSGi support. It would be nice if the runtime libraries were OSGi-fied, so that Kotlin could be used directly to build OSGi bundles. Alas, the runtime lacks the appropriate manifest entries. Is there any technical obstacle that would prevent proper functionality in OSGi environment, or nobody just raised such a request so far?

---

<div class="post-metadata">

**Author:** ![abreslav](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/abreslav/32/8279_2.png) [@abreslav](https://discuss.kotlinlang.org/u/abreslav)\
**Post date:** [November 13, 2014, 1:06am UTC](https://discuss.kotlinlang.org/t/kotlin-runtime-and-osgi/362/2 "2014-11-13T01:06:03Z")

</div>

I don't think there's any technical obstacle to using Kotlin's runtime in OSGi.

We could add the appropriate entries to the manifest of kotlin-runtime, no problem. Please file an issue in the [tracker](https://youtrack.jetbrains.com/issues/KT).  
Feel free to contribute your solution too 🙂

---

<div class="post-metadata">

**Author:** ![pdolezal](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@pdolezal](https://discuss.kotlinlang.org/u/pdolezal)\
**Post date:** [November 14, 2014, 10:24pm UTC](https://discuss.kotlinlang.org/t/kotlin-runtime-and-osgi/362/3 "2014-11-14T22:24:59Z")

</div>

Good to hear that there should be no obstacle. I'll look next week, whether I can propose something – hopefully time allows. I guess that _bnd_ could be used to wrap the kotlin-runtime.jar and this could be sufficient for the time being. Anyway, I'll file the issue in the tracker.

---

<div class="post-metadata">

**Author:** ![Oliver\_Plohmann](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/oliver_plohmann/32/2398_2.png) [@Oliver\_Plohmann](https://discuss.kotlinlang.org/u/Oliver_Plohmann)\
**Post date:** [January 2, 2015, 3:47pm UTC](https://discuss.kotlinlang.org/t/kotlin-runtime-and-osgi/362/4 "2015-01-02T15:47:11Z")

</div>

I just created an OSGi bundle with an OSGi activator class written in Kotlin. The OSGi bundle includes the kotlin runtime right away without further ado. Was using Karaf and it worked right out of the box.
