# Seeking for help: support Kotlin in ActFramework

**URL:** <https://discuss.kotlinlang.org/t/seeking-for-help-support-kotlin-in-actframework/2348>\
**Category:** Web Development\
**Created:** [March 3, 2017, 1:26am UTC](https://discuss.kotlinlang.org/t/seeking-for-help-support-kotlin-in-actframework/2348 "2017-03-03T01:26:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![greenlaw110](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/greenlaw110/32/2372_2.png) [@greenlaw110](https://discuss.kotlinlang.org/u/greenlaw110)\
**Post date:** [March 3, 2017, 1:26am UTC](https://discuss.kotlinlang.org/t/seeking-for-help-support-kotlin-in-actframework/2348/1 "2017-03-03T01:26:26Z")

</div>

I like the Kotlin as an new JVM language, it’s simple, elegant and expressive. I really want to support Kotlin in my new MVC fullstack framework: [ActFramework](http://actframework.org).

One important feature of ActFramework is [hot-reloading](https://www.youtube.com/watch?v=68Z-jTL6fDg&t=3s&index=10&list=PL9Nmeir_4QLJGinjAh8HjfCQY5yTuyneK) at dev mode. I rely on ecj to compile source code in memory to support it.

I am looking for a way to add support to kt source and I need:

- An API to call compiler to compile a list of source code in memory (not from build tool, e.g. maven/gradle etc)
- An API to callback when compiling looking for a dependency type (like ecj’s [INamedEnvironment](https://github.com/eclipse/eclipse.jdt.core/blob/master/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/INameEnvironment.java))
- (Optionally) Able to compile mixed Java source and kt source list

Any clue or help is appreciated!

---

<div class="post-metadata">

**Author:** ![ilya.gorbunov](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/ilya.gorbunov/32/1645_2.png) [@ilya.gorbunov](https://discuss.kotlinlang.org/u/ilya.gorbunov)\
**Post date:** [March 6, 2017, 12:30pm UTC](https://discuss.kotlinlang.org/t/seeking-for-help-support-kotlin-in-actframework/2348/2 "2017-03-06T12:30:16Z")

</div>

> [@greenlaw110](#):
>
> An API to call compiler to compile a list of source code in memory (not from build tool, e.g. maven/gradle etc)  
> An API to callback when compiling looking for a dependency type (like ecj’s INamedEnvironment)  
> (Optionally) Able to compile mixed Java source and kt source list

AFAIK, there is no such _public_ API provided by Kotlin compiler at this moment.

If you’re curious, you can explore Kotlin-to-JVM compiler entry point here [https://github.com/JetBrains/kotlin/blob/1.1.0/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/K2JVMCompiler.kt](https://github.com/JetBrains/kotlin/blob/1.1.0/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/K2JVMCompiler.kt), but note that you’re doing it at your own risk.

---

<div class="post-metadata">

**Author:** ![greenlaw110](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/greenlaw110/32/2372_2.png) [@greenlaw110](https://discuss.kotlinlang.org/u/greenlaw110)\
**Post date:** [March 7, 2017, 6:46am UTC](https://discuss.kotlinlang.org/t/seeking-for-help-support-kotlin-in-actframework/2348/3 "2017-03-07T06:46:51Z")

</div>

Thanks ilya. Is that K2JVMCompiler able to compile mixed Java/KT source files?
